|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
7 | | - # Review gh actions docs if you want to further define triggers, paths, etc |
8 | | - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + pages: write |
| 11 | + id-token: write |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: "pages" |
| 15 | + cancel-in-progress: false |
9 | 16 |
|
10 | 17 | jobs: |
11 | | - deploy: |
12 | | - name: Deploy to GitHub Pages |
| 18 | + build: |
13 | 19 | runs-on: ubuntu-latest |
14 | 20 | steps: |
15 | | - - uses: actions/checkout@v3 |
16 | | - - uses: actions/setup-node@v3 |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - uses: actions/setup-node@v4 |
17 | 24 | with: |
18 | | - node-version: 22 |
| 25 | + node-version: 20 |
19 | 26 | cache: npm |
20 | 27 |
|
21 | 28 | - name: Install dependencies |
22 | 29 | run: npm ci |
| 30 | + |
23 | 31 | - name: Build website |
24 | 32 | run: npm run build |
25 | 33 |
|
26 | | - - name: Create CNAME file |
27 | | - run: echo 'vstrike.brobridge.com' > ./build/CNAME |
| 34 | + - name: Upload artifact |
| 35 | + uses: actions/upload-pages-artifact@v3 |
| 36 | + with: |
| 37 | + path: build |
28 | 38 |
|
29 | | - # Popular action to deploy to GitHub Pages: |
30 | | - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus |
| 39 | + deploy: |
| 40 | + environment: |
| 41 | + name: github-pages |
| 42 | + url: ${{ steps.deployment.outputs.page_url }} |
| 43 | + runs-on: ubuntu-latest |
| 44 | + needs: build |
| 45 | + steps: |
31 | 46 | - name: Deploy to GitHub Pages |
32 | | - uses: peaceiris/actions-gh-pages@v3 |
33 | | - with: |
34 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
35 | | - # Build output to publish to the `gh-pages` branch: |
36 | | - publish_dir: ./build |
37 | | - # The following lines assign commit authorship to the official |
38 | | - # GH-Actions bot for deploys to `gh-pages` branch: |
39 | | - # https://github.com/actions/checkout/issues/13#issuecomment-724415212 |
40 | | - # The GH actions bot is used by default if you didn't specify the two fields. |
41 | | - # You can swap them out with your own user credentials. |
42 | | - user_name: github-actions[bot] |
43 | | - user_email: 41898282+github-actions[bot]@users.noreply.github.com |
| 47 | + id: deployment |
| 48 | + uses: actions/deploy-pages@v4 |
0 commit comments