This repository has been archived by the owner on Dec 7, 2024. It is now read-only.
ci: deploying to GitHub Pages #1
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: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
permissions: | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
timeout-minutes: 10 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Add WASM target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install trunk | |
run: cargo install --locked trunk | |
- name: Build | |
run: cd nova-playground && trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
with: | |
enablement: true | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "./dist/" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |