|
1 | | -# Simple workflow for deploying static content to GitHub Pages |
| 1 | +# .github/workflows/static.yml |
2 | 2 | name: Deploy static content to Pages |
3 | 3 |
|
4 | 4 | on: |
5 | | - # Runs on pushes targeting the default branch |
6 | 5 | push: |
7 | 6 | branches: ["main"] |
8 | | - |
9 | | - # Allows you to run this workflow manually from the Actions tab |
10 | 7 | workflow_dispatch: |
11 | 8 |
|
12 | | -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
13 | 9 | permissions: |
14 | 10 | contents: read |
15 | 11 | pages: write |
16 | 12 | id-token: write |
17 | 13 |
|
18 | | -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
19 | | -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
20 | 14 | concurrency: |
21 | 15 | group: "pages" |
22 | 16 | cancel-in-progress: false |
23 | 17 |
|
24 | 18 | jobs: |
25 | | - # Single deploy job since we're just deploying |
26 | 19 | deploy: |
27 | 20 | environment: |
28 | 21 | name: github-pages |
29 | 22 | url: ${{ steps.deployment.outputs.page_url }} |
30 | 23 | runs-on: ubuntu-latest |
31 | 24 | steps: |
32 | | - - name: Checkout |
| 25 | + - name: Checkout repository |
33 | 26 | uses: actions/checkout@v4 |
34 | | - - name: Setup Pages |
35 | | - uses: actions/configure-pages@v5 |
36 | | - - name: Upload artifact |
| 27 | + |
| 28 | + - name: Set up Node.js |
| 29 | + uses: actions/setup-node@v4 |
| 30 | + with: |
| 31 | + node-version: '20' |
| 32 | + |
| 33 | + - name: Run build script |
| 34 | + run: | |
| 35 | + chmod +x main/Build/Buildscripts/build.sh |
| 36 | + ./main/Build/Buildscripts/build.sh |
| 37 | +
|
| 38 | + - name: Upload GitHub Pages artifact |
37 | 39 | uses: actions/upload-pages-artifact@v3 |
38 | 40 | with: |
39 | | - # Upload entire repository |
40 | | - path: '.' |
| 41 | + path: 'main/Build/dist' |
| 42 | + |
41 | 43 | - name: Deploy to GitHub Pages |
42 | 44 | id: deployment |
43 | 45 | uses: actions/deploy-pages@v4 |
0 commit comments