|
| 1 | +name: Deploy |
| 2 | + |
| 3 | +on: |
| 4 | + # Manual deployment trigger |
| 5 | + workflow_dispatch: |
| 6 | + inputs: |
| 7 | + deploy_type: |
| 8 | + description: 'type' |
| 9 | + required: true |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - 'nightly' |
| 13 | + - 'latest' |
| 14 | + default: 'nightly' |
| 15 | + |
| 16 | + # Scheduled nightly deployments |
| 17 | + schedule: |
| 18 | + - cron: '0 0 * * *' # Runs daily at midnight UTC |
| 19 | + |
| 20 | +jobs: |
| 21 | + deploy-nightly: |
| 22 | + if: ${{ github.event.inputs.deploy_type == 'nightly' || github.event_name == 'schedule' }} |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + |
| 27 | + with: |
| 28 | + node-version: 22 |
| 29 | + cache: 'yarn' |
| 30 | + |
| 31 | + - name: Install |
| 32 | + run: | |
| 33 | + export NODE_OPTIONS="--max_old_space_size=4096" |
| 34 | + yarn install |
| 35 | +
|
| 36 | + - name: Update version.md |
| 37 | + run: | |
| 38 | + touch packages/website/static/version.md |
| 39 | + git log -1 &>> packages/website/static/version.md |
| 40 | +
|
| 41 | + - name: Build |
| 42 | + env: |
| 43 | + DEPLOYMENT_TYPE: "nightly" |
| 44 | + run: | |
| 45 | + yarn ci:deploy:nightly |
| 46 | +
|
| 47 | + - name: Deploy |
| 48 | + |
| 49 | + with: |
| 50 | + branch: gh-pages # The branch the action should deploy to. |
| 51 | + folder: packages/website/build # The folder the action should deploy. |
| 52 | + target-folder: nightly |
| 53 | + clean: true |
| 54 | + |
| 55 | + deploy-latest: |
| 56 | + runs-on: ubuntu-latest |
| 57 | + if: ${{ github.event.inputs.deploy_type == 'latest' }} |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v4 |
| 60 | + |
| 61 | + with: |
| 62 | + node-version: 22 |
| 63 | + cache: 'yarn' |
| 64 | + |
| 65 | + - name: Install |
| 66 | + run: | |
| 67 | + export NODE_OPTIONS="--max_old_space_size=4096" |
| 68 | + yarn install |
| 69 | +
|
| 70 | + - name: Update version.md |
| 71 | + run: | |
| 72 | + touch packages/website/static/version.md |
| 73 | + git log -1 &>> packages/website/static/version.md |
| 74 | +
|
| 75 | + - name: Build |
| 76 | + env: |
| 77 | + DEPLOYMENT_TYPE: "latest" |
| 78 | + run: | |
| 79 | + yarn ci:deploy |
| 80 | +
|
| 81 | + - name: Deploy |
| 82 | + |
| 83 | + with: |
| 84 | + branch: gh-pages # The branch the action should deploy to. |
| 85 | + folder: packages/website/build # The folder the action should deploy. |
| 86 | + clean: true |
| 87 | + clean-exclude: | |
| 88 | + nightly |
| 89 | + v1 |
| 90 | + googlea519d963aa8f580f.html |
0 commit comments