diff options
| author | Dania Rifki <atomicnumberphi@gmail.com> | 2026-02-25 09:19:55 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-02-25 10:07:31 +0800 |
| commit | a6cb8214272ec73757f36591f9335129c4629fff (patch) | |
| tree | 8a8b501f4c0bfdf4bdd8ca6786d8732d033bf0e1 /.github/workflows/static.yml | |
| parent | db769a1bd4fba3ccb4161207df800852431f63d5 (diff) | |
| download | yuescript-a6cb8214272ec73757f36591f9335129c4629fff.tar.gz yuescript-a6cb8214272ec73757f36591f9335129c4629fff.tar.bz2 yuescript-a6cb8214272ec73757f36591f9335129c4629fff.zip | |
Switch from yarn to pnpm
Diffstat (limited to '.github/workflows/static.yml')
| -rw-r--r-- | .github/workflows/static.yml | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index c67c7da..28fd9b1 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml | |||
| @@ -1,9 +1,6 @@ | |||
| 1 | # Simple workflow for deploying static content to GitHub Pages | ||
| 2 | name: Deploy static content to Pages | 1 | name: Deploy static content to Pages |
| 3 | 2 | ||
| 4 | on: | 3 | on: |
| 5 | |||
| 6 | # Allows you to run this workflow manually from the Actions tab | ||
| 7 | workflow_dispatch: | 4 | workflow_dispatch: |
| 8 | 5 | ||
| 9 | permissions: | 6 | permissions: |
| @@ -20,25 +17,54 @@ jobs: | |||
| 20 | environment: | 17 | environment: |
| 21 | name: github-pages | 18 | name: github-pages |
| 22 | url: ${{ steps.deployment.outputs.page_url }} | 19 | url: ${{ steps.deployment.outputs.page_url }} |
| 23 | runs-on: macos-latest | 20 | runs-on: ubuntu-latest |
| 24 | steps: | 21 | steps: |
| 25 | - name: Checkout | 22 | - name: Checkout |
| 26 | uses: actions/checkout@v4 | 23 | uses: actions/checkout@v6 |
| 27 | - name: Setup Pages | 24 | |
| 28 | uses: actions/configure-pages@v5 | 25 | - name: Cache Emscripten |
| 29 | - name: Prepare Site | 26 | uses: actions/cache@v4 |
| 27 | with: | ||
| 28 | path: ~/emsdk | ||
| 29 | key: emsdk-${{ runner.os }}-latest | ||
| 30 | |||
| 31 | - name: Install Emscripten | ||
| 32 | run: | | ||
| 33 | git clone https://github.com/emscripten-core/emsdk.git ~/emsdk | ||
| 34 | ~/emsdk/emsdk install latest | ||
| 35 | ~/emsdk/emsdk activate latest | ||
| 36 | |||
| 37 | - name: Build WASM | ||
| 30 | run: | | 38 | run: | |
| 31 | brew upgrade -f python | 39 | source ~/emsdk/emsdk_env.sh |
| 32 | brew install emscripten | ||
| 33 | make wasm | 40 | make wasm |
| 41 | |||
| 42 | - name: Setup pnpm | ||
| 43 | uses: pnpm/action-setup@v4 | ||
| 44 | with: | ||
| 45 | version: 10 | ||
| 46 | |||
| 47 | - name: Setup Node | ||
| 48 | uses: actions/setup-node@v6 | ||
| 49 | with: | ||
| 50 | node-version: 20 | ||
| 51 | cache: 'pnpm' | ||
| 52 | cache-dependency-path: doc/pnpm-lock.yaml | ||
| 53 | |||
| 54 | - name: Install and build docs | ||
| 55 | run: | | ||
| 34 | cd doc | 56 | cd doc |
| 35 | yarn | 57 | pnpm install |
| 36 | yarn build | 58 | pnpm run build |
| 37 | cd .. | 59 | |
| 60 | - name: Setup Pages | ||
| 61 | uses: actions/configure-pages@v5 | ||
| 62 | |||
| 38 | - name: Upload artifact | 63 | - name: Upload artifact |
| 39 | uses: actions/upload-pages-artifact@v3 | 64 | uses: actions/upload-pages-artifact@v3 |
| 40 | with: | 65 | with: |
| 41 | path: 'doc/docs/.vitepress/dist' | 66 | path: 'doc/docs/.vitepress/dist' |
| 67 | |||
| 42 | - name: Deploy to GitHub Pages | 68 | - name: Deploy to GitHub Pages |
| 43 | id: deployment | 69 | id: deployment |
| 44 | uses: actions/deploy-pages@v4 | 70 | uses: actions/deploy-pages@v4 \ No newline at end of file |
