|
1 | 1 | name: Deploy to GitHub Pages |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - "main" |
7 | | - paths: |
8 | | - - "apps/website/**" |
9 | | - - ".github/workflows/gh-pages.yml" |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "main" |
| 7 | + paths: |
| 8 | + - "apps/website/**" |
| 9 | + - ".github/workflows/gh-pages.yml" |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - # Build job |
13 | | - build: |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - name: Checkout repository |
17 | | - uses: actions/checkout@v4 |
18 | | - |
19 | | - - name: Setup Node.js |
20 | | - uses: actions/setup-node@v5 |
21 | | - with: |
22 | | - node-version-file: ".nvmrc" |
23 | | - cache: "yarn" |
24 | | - |
25 | | - - name: Setup Turbo and Install dependencies |
26 | | - run: | |
27 | | - npx -y turbo prune website; |
28 | | - cd out; |
29 | | - yarn install --immutable |
30 | | -
|
31 | | - - name: Build static files |
32 | | - id: build |
33 | | - working-directory: ./out |
34 | | - run: yarn build |
35 | | - |
36 | | - - name: Upload static files as artifact |
37 | | - id: deployment |
38 | | - uses: actions/upload-pages-artifact@v3 |
39 | | - with: |
40 | | - path: ./out/apps/website/build |
41 | | - |
42 | | - # Deploy job |
43 | | - deploy: |
44 | | - # Add a dependency to the build job |
45 | | - needs: build |
46 | | - |
47 | | - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment |
48 | | - permissions: |
49 | | - pages: write # to deploy to Pages |
50 | | - id-token: write # to verify the deployment originates from an appropriate source |
51 | | - |
52 | | - # Deploy to the github-pages environment |
53 | | - environment: |
54 | | - name: github-pages |
55 | | - url: ${{ steps.deployment.outputs.page_url }} |
56 | | - |
57 | | - # Specify runner + deployment step |
58 | | - runs-on: ubuntu-latest |
59 | | - steps: |
60 | | - - name: Deploy to GitHub Pages |
61 | | - id: deployment |
62 | | - uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |
| 12 | + # Build job |
| 13 | + build: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - name: Checkout repository |
| 17 | + uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Setup Node.js |
| 20 | + uses: actions/setup-node@v5 |
| 21 | + with: |
| 22 | + node-version-file: ".nvmrc" |
| 23 | + cache: "yarn" |
| 24 | + |
| 25 | + - name: Setup Turbo |
| 26 | + run: npx -y turbo prune website; |
| 27 | + |
| 28 | + - name: Install dependencies |
| 29 | + working-directory: ./out |
| 30 | + run: yarn install --immutable |
| 31 | + |
| 32 | + - name: Build static files |
| 33 | + working-directory: ./out |
| 34 | + run: yarn build |
| 35 | + |
| 36 | + - name: Upload static files as artifact |
| 37 | + id: deployment |
| 38 | + uses: actions/upload-pages-artifact@v3 |
| 39 | + with: |
| 40 | + path: ./out/apps/website/build |
| 41 | + |
| 42 | + # Deploy job |
| 43 | + deploy: |
| 44 | + # Add a dependency to the build job |
| 45 | + needs: build |
| 46 | + |
| 47 | + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment |
| 48 | + permissions: |
| 49 | + pages: write # to deploy to Pages |
| 50 | + id-token: write # to verify the deployment originates from an appropriate source |
| 51 | + |
| 52 | + # Deploy to the github-pages environment |
| 53 | + environment: |
| 54 | + name: github-pages |
| 55 | + url: ${{ steps.deployment.outputs.page_url }} |
| 56 | + |
| 57 | + # Specify runner + deployment step |
| 58 | + runs-on: ubuntu-latest |
| 59 | + steps: |
| 60 | + - name: Deploy to GitHub Pages |
| 61 | + id: deployment |
| 62 | + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |
0 commit comments