Merge pull request #37 from redhat-developer/dependabot/npm_and_yarn/… #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Aonic UI Deploy & Release | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push event for the main branch | |
push: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
#workflow_dispatch: | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "deploy" | |
deploy: | |
name: Deploy & Release | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout Repo 🛎️ | |
uses: actions/checkout@v3 | |
- name: Setup Node.js 18.x ⚙️ | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Dependencies 🥁 | |
run: yarn | |
- name: Lint ✅ | |
run: yarn lint | |
- name: Test 🧪 | |
run: yarn test | |
- name: Build Library 🏗 | |
run: yarn build | |
- name: Deploy Storybook 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs/storybook-static # The folder the action should deploy. | |
- name: Create Release Pull Request or Publish to npm 🚀 | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
# This expects you to have a script called release which does a build for your packages and calls changeset publish | |
publish: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.AONIC_NPM_TOKEN }} |