dependabot: update github-actions #66
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: GitHub Pages | |
on: | |
push: | |
branches: [main, master] | |
workflow_dispatch: | |
concurrency: | |
group: github-pages-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_and_deploy_github_pages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install rust nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
target: wasm32-unknown-unknown | |
toolchain: nightly | |
override: true | |
- name: Install wasm-pack | |
run: curl -sSf https://rustwasm.github.io/wasm-pack/installer/init.sh | sh | |
- name: Cache target | |
id: cache-target | |
uses: actions/cache@v3 | |
with: | |
path: target | |
key: ${{ runner.os }}-target | |
- name: Cache node_modules | |
id: cache-node_modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules | |
- name: Install npm packages | |
run: npm install | |
- name: Build wasm | |
run: npm run build:wasm | |
- name: Build wasm and frontend | |
run: npm run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |