Use browser local storage for progress (#12) #7
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: Build and deploy to GitHub Pages | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
gh-deploy: | |
if: github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') | |
name: Deploy to GitHub Pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
- name: Build component | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: | | |
npm install | |
npm run build | |
- name: Copy index and data files | |
run: | | |
cp ./src/public/index.html ./dist/index.html | |
cp ./src/public/assessment-data.yaml ./dist/assessment-data.yaml | |
# Popular action to deploy to GitHub Pages: | |
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# Build output to publish to the `gh-pages` branch: | |
publish_dir: ./dist | |
destination_dir: develop |