|
1 |
| -on: [push] |
| 1 | +name: Deploy to Pages |
2 | 2 |
|
3 |
| -name: Deploy to GH Pages |
| 3 | +on: |
| 4 | + # Runs on pushes targeting the default branch |
| 5 | + push: |
| 6 | + branches: ["master"] |
4 | 7 |
|
| 8 | +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
5 | 9 | permissions:
|
6 | 10 | contents: read
|
7 | 11 | pages: write
|
8 | 12 | id-token: write
|
9 | 13 |
|
| 14 | + # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
| 15 | +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
| 16 | +concurrency: |
| 17 | + group: "pages" |
| 18 | + cancel-in-progress: false |
| 19 | + |
10 | 20 | jobs:
|
11 | 21 | build:
|
12 | 22 | runs-on: ubuntu-latest
|
13 | 23 | steps:
|
14 |
| - - uses: actions/checkout@v2 |
15 |
| - - uses: actions-rs/toolchain@v1 |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - uses: dtolnay/rust-toolchain@stable |
16 | 28 | with:
|
17 |
| - profile: minimal |
18 |
| - toolchain: nightly |
| 29 | + toolchain: "1.78.0" |
19 | 30 | target: wasm32-unknown-unknown
|
20 |
| - - run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh |
21 |
| - - run: wasm-pack build |
22 |
| - env: |
23 |
| - RUSTUP_TOOLCHAIN: nightly |
24 |
| - - uses: actions/setup-node@v3 |
25 |
| - - run: npm ci |
26 |
| - - run: npm run build -- --base="./" |
| 31 | + - name: Setup Node |
| 32 | + uses: actions/setup-node@v4 |
| 33 | + with: |
| 34 | + node-version: "20" |
| 35 | + - uses: pnpm/action-setup@v3 |
| 36 | + name: Install pnpm |
| 37 | + with: |
| 38 | + version: 8 |
| 39 | + run_install: true |
27 | 40 | - name: Setup Pages
|
28 |
| - uses: actions/configure-pages@v2 |
| 41 | + id: pages |
| 42 | + uses: actions/configure-pages@v5 |
| 43 | + |
| 44 | + - name: Create wasm package and build page |
| 45 | + run: | |
| 46 | + pnpm exec wasm-pack build |
| 47 | + pnpm build -- --base="./" |
| 48 | +
|
29 | 49 | - name: Upload artifact
|
30 |
| - uses: actions/upload-pages-artifact@v1 |
| 50 | + uses: actions/upload-pages-artifact@v3 |
31 | 51 | with:
|
32 | 52 | path: dist
|
33 | 53 |
|
34 | 54 | deploy:
|
35 | 55 | environment:
|
36 | 56 | name: github-pages
|
37 | 57 | url: ${{ steps.deployment.outputs.page_url }}
|
38 |
| - runs-on: ubuntu-latest |
39 | 58 | needs: build
|
| 59 | + runs-on: ubuntu-latest |
| 60 | + name: Deploy |
40 | 61 | steps:
|
41 | 62 | - name: Deploy to GitHub Pages
|
42 | 63 | id: deployment
|
43 |
| - uses: actions/deploy-pages@v1 |
| 64 | + uses: actions/deploy-pages@v4 |
0 commit comments