Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Commit

Permalink
ci: deploying to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mazziechai committed Mar 25, 2024
1 parent 5999a75 commit 30a8dca
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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

0 comments on commit 30a8dca

Please sign in to comment.