Update LICENSE from GPL to MIT (#120) #94
This file contains hidden or 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
# This workflow is triggered when a new commit is pushed to the master branch or a pull request is opened against the master branch. | |
# It builds the Storybook documentation and pushes it to the gh-pages branch. | |
# It also runs the test suite. | |
name: Build and Test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build-storybook: | |
name: Build Storybook | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Setup git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
- name: Fetch master branch | |
run: | | |
git fetch origin | |
git checkout master | |
- name: Install dependencies | |
run: npm ci | |
- name: Build storybook docs | |
run: npm run build-storybook | |
- name: Copy docs to temporary location | |
run: cp -r docs/master /tmp/rat_docs | |
- name: Checkout gh-pages branch | |
run: git checkout gh-pages | |
- name: Copy docs back to the repository | |
run: | | |
rm -rf docs/master | |
cp -r /tmp/rat_docs docs/master | |
- name: Commit and push changes | |
run: | | |
git add docs/master -f | |
git commit --allow-empty -m "[BOT] Build Storybook" | |
git push origin gh-pages | |
run-tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test |