|
1 | 1 | name: Deploy to GitHub Pages
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - # Allows you to run this workflow manually from the Actions tab on GitHub. |
5 |
| - workflow_dispatch: |
6 |
| - # Trigger workflow when one of the data files was changed (check if separate jobs of gather-data each trigger this workflow separately) |
7 |
| - # push: |
8 |
| - # paths: |
9 |
| - # - '**/*.json' |
| 4 | + # Allows you to run this workflow manually from the Actions tab on GitHub. |
| 5 | + workflow_dispatch: |
10 | 6 |
|
11 | 7 | # Allow this job to clone the repo and create a page deployment
|
12 | 8 | permissions:
|
13 |
| - contents: read |
14 |
| - pages: write |
15 |
| - id-token: write |
| 9 | + contents: read |
| 10 | + pages: write |
| 11 | + id-token: write |
16 | 12 |
|
17 | 13 | jobs:
|
18 |
| - build: |
19 |
| - runs-on: ubuntu-latest |
20 |
| - steps: |
21 |
| - - name: Checkout your repository using git |
22 |
| - uses: actions/checkout@v4 |
23 |
| - - name: Setup Bun |
24 |
| - uses: oven-sh/setup-bun@v2 |
25 |
| - - name: Install dependencies |
26 |
| - run: bun install --frozen-lockfile |
27 |
| - - name: Install, build, and upload your site |
28 |
| - uses: withastro/action@v3 |
29 |
| - with: |
30 |
| - path: website # The root location of your Astro project inside the repository. (optional) |
31 |
| - # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional) |
32 |
| - package-manager: bun@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) |
33 |
| - |
34 |
| - deploy: |
35 |
| - needs: build |
36 |
| - runs-on: ubuntu-latest |
37 |
| - environment: |
38 |
| - name: github-pages |
39 |
| - url: ${{ steps.deployment.outputs.page_url }} |
40 |
| - steps: |
41 |
| - - name: Deploy to GitHub Pages |
42 |
| - id: deployment |
43 |
| - uses: actions/deploy-pages@v4 |
| 14 | + build: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Checkout your repository using git |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Install Bun |
| 21 | + uses: oven-sh/setup-bun@v1 |
| 22 | + with: |
| 23 | + bun-version: latest |
| 24 | + |
| 25 | + - name: Install Rust |
| 26 | + uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 27 | + with: |
| 28 | + toolchain: nightly |
| 29 | + target: wasm32-unknown-unknown |
| 30 | + |
| 31 | + - name: Install wasm-pack |
| 32 | + run: bun install -g wasm-pack |
| 33 | + |
| 34 | + - name: Build data-wasm |
| 35 | + run: make wasm |
| 36 | + |
| 37 | + - name: Install, build, and upload your site |
| 38 | + uses: withastro/action@v3 |
| 39 | + with: |
| 40 | + path: website # The root location of your Astro project inside the repository. (optional) |
| 41 | + # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional) |
| 42 | + package-manager: bun@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) |
| 43 | + |
| 44 | + deploy: |
| 45 | + needs: build |
| 46 | + runs-on: ubuntu-latest |
| 47 | + environment: |
| 48 | + name: github-pages |
| 49 | + url: ${{ steps.deployment.outputs.page_url }} |
| 50 | + steps: |
| 51 | + - name: Deploy to GitHub Pages |
| 52 | + id: deployment |
| 53 | + uses: actions/deploy-pages@v4 |
0 commit comments