|
1 | 1 | name: Deploy to GitHub Pages |
2 | 2 | env: |
3 | | - GITHUB_TOKEN: ${{ secrets.t }} |
| 3 | + GITHUB_TOKEN: ${{ secrets.t }} |
4 | 4 | on: |
5 | | - workflow_dispatch: |
6 | | - repository_dispatch: |
7 | | - push: |
| 5 | + workflow_dispatch: |
| 6 | + repository_dispatch: |
| 7 | + push: |
8 | 8 |
|
9 | 9 | permissions: |
10 | | - contents: read |
11 | | - pages: write |
12 | | - id-token: write |
| 10 | + contents: read |
| 11 | + pages: write |
| 12 | + id-token: write |
13 | 13 |
|
14 | 14 | concurrency: |
15 | | - group: "deploy" |
16 | | - cancel-in-progress: true |
| 15 | + group: "deploy" |
| 16 | + cancel-in-progress: true |
17 | 17 |
|
18 | 18 | jobs: |
19 | | - build: |
20 | | - runs-on: ubuntu-latest |
21 | | - steps: |
22 | | - - name: Checkout |
23 | | - uses: actions/checkout@v4 |
24 | | - - name: Setup GitHub Pages |
25 | | - id: pages |
26 | | - uses: actions/configure-pages@v4 |
27 | | - - name: Install Node.js |
28 | | - uses: actions/setup-node@v4 |
29 | | - with: |
30 | | - node-version: 16.x |
31 | | - - name: Install dependencies |
32 | | - run: npm i -g pnpm@v6 && pnpm up && pnpm i --shamefully-hoist |
33 | | - - name: Build |
34 | | - run: npm run build |
35 | | - env: |
36 | | - NODE_ENV: production |
37 | | - ENABLE_SERVICE_WORKER: 1 |
38 | | - - name: Test |
39 | | - run: npm test |
40 | | - - name: Upload artifact |
41 | | - uses: actions/upload-pages-artifact@v3 |
42 | | - with: |
43 | | - path: ./dist/ |
| 19 | + build: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - name: Checkout |
| 23 | + uses: actions/checkout@v4 |
| 24 | + - name: Setup GitHub Pages |
| 25 | + id: pages |
| 26 | + uses: actions/configure-pages@v4 |
| 27 | + - name: Install Node.js |
| 28 | + uses: actions/setup-node@v4 |
| 29 | + with: |
| 30 | + node-version: 20.x |
| 31 | + - name: Install dependencies |
| 32 | + run: npm i -g pnpm@v11 && pnpm up && pnpm i --shamefully-hoist |
| 33 | + - name: Build |
| 34 | + run: pnpm run build |
| 35 | + env: |
| 36 | + NODE_ENV: production |
| 37 | + ENABLE_SERVICE_WORKER: 1 |
| 38 | + - name: Test |
| 39 | + run: npm test |
| 40 | + - name: Upload artifact |
| 41 | + uses: actions/upload-pages-artifact@v3 |
| 42 | + with: |
| 43 | + path: ./dist/ |
44 | 44 |
|
45 | | - deploy: |
46 | | - environment: |
47 | | - name: github-pages |
48 | | - url: ${{ steps.deployment.outputs.page_url }} |
49 | | - runs-on: ubuntu-latest |
50 | | - needs: build |
51 | | - steps: |
52 | | - - name: Deploy to GitHub Pages |
53 | | - id: deployment |
54 | | - uses: actions/deploy-pages@v4 |
| 45 | + deploy: |
| 46 | + environment: |
| 47 | + name: github-pages |
| 48 | + url: ${{ steps.deployment.outputs.page_url }} |
| 49 | + runs-on: ubuntu-latest |
| 50 | + needs: build |
| 51 | + steps: |
| 52 | + - name: Deploy to GitHub Pages |
| 53 | + id: deployment |
| 54 | + uses: actions/deploy-pages@v4 |
0 commit comments