Skip to content

Add Issue Template for New Feature Request #95

Add Issue Template for New Feature Request

Add Issue Template for New Feature Request #95

Workflow file for this run

# 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