|
1 | 1 | name: Deploy to github pages |
2 | 2 | on: |
3 | | - push: |
4 | | - branches: [main] |
| 3 | + push: |
| 4 | + branches: [main] |
5 | 5 |
|
6 | 6 | jobs: |
7 | | - build-and-deploy-to-github-pages: |
8 | | - runs-on: ubuntu-latest |
9 | | - steps: |
10 | | - - name: Checkout |
11 | | - uses: actions/checkout@v2.3.1 |
12 | | - with: |
13 | | - submodules: "recursive" |
14 | | - lfs: true |
| 7 | + build-and-deploy-to-github-pages: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - name: Checkout |
| 11 | + uses: actions/checkout@v2.3.1 |
| 12 | + with: |
| 13 | + submodules: "recursive" |
| 14 | + lfs: true |
15 | 15 |
|
16 | | - - name: Install and Build |
17 | | - run: | |
18 | | - npm install |
19 | | - npm run build |
| 16 | + - name: Install and Build |
| 17 | + run: | |
| 18 | + npm install |
| 19 | + npm run build |
20 | 20 |
|
21 | | - - name: Check build size |
22 | | - # 1GB = 1073741824 bytes |
23 | | - run: | |
24 | | - SIZE=$(du -s -B 1 dist/ | cut -f 1) |
25 | | - if [[ $SIZE -gt 1073741824 ]]; then echo 'dist folder exceeds limit of 1GB! Aborting'; exit 1; fi |
26 | | -
|
27 | | - - name: Deploy to Khronos repo |
28 | | - continue-on-error: true # If no changes are commited this action fails |
29 | | - uses: JamesIves/github-pages-deploy-action@v4.6.3 |
30 | | - with: |
31 | | - branch: main |
32 | | - folder: dist/ |
33 | | - token: ${{ secrets.BUILD_GITHUB_PAGES }} |
34 | | - repository-name: KhronosGroup/glTF-Sample-Viewer-Release |
35 | | - target-folder: docs |
36 | | - clean-exclude: | |
37 | | - docs/glxf |
38 | | - glxf |
39 | | - interactivity |
| 21 | + - name: Check build size |
| 22 | + # 1GB = 1073741824 bytes |
| 23 | + run: | |
| 24 | + SIZE=$(du -s -B 1 dist/ | cut -f 1) |
| 25 | + if [[ $SIZE -gt 1073741824 ]]; then echo 'dist folder exceeds limit of 1GB! Aborting'; exit 1; fi |
40 | 26 |
|
| 27 | + - name: Deploy to Khronos repo |
| 28 | + continue-on-error: true # If no changes are commited this action fails |
| 29 | + uses: JamesIves/github-pages-deploy-action@v4.6.3 |
| 30 | + with: |
| 31 | + branch: main |
| 32 | + folder: dist/ |
| 33 | + token: ${{ secrets.BUILD_GITHUB_PAGES }} |
| 34 | + repository-name: KhronosGroup/glTF-Sample-Viewer-Release |
| 35 | + target-folder: docs |
| 36 | + clean-exclude: | |
| 37 | + docs/glxf |
| 38 | + glxf |
| 39 | + interactivity |
| 40 | + physics |
0 commit comments