Skip to content

Deploy static content to Pages #11

Deploy static content to Pages

Deploy static content to Pages #11

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install yarn deps
run: cd website && yarn install
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Use rust nightly
run: rustup install nightly && rustup default nightly
- name: Build
working-directory: ./website
run: cargo version && chmod +x scripts/build.sh && scripts/build.sh
- name: Deploy to github pages
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: website/build # The folder the action should deploy.