|
6 | 6 | branches: |
7 | 7 | - master |
8 | 8 | - stable* |
| 9 | + schedule: |
| 10 | + - cron: '0 2 * * *' # 02:00 UTC daily — full build + deploy |
9 | 11 |
|
10 | 12 | permissions: |
11 | 13 | contents: read |
@@ -505,7 +507,7 @@ jobs: |
505 | 507 | deploy: |
506 | 508 | name: Deploy documentation for gh-pages |
507 | 509 | needs: stage-and-check |
508 | | - if: github.event_name == 'push' |
| 510 | + if: github.event_name == 'schedule' |
509 | 511 | runs-on: ubuntu-latest |
510 | 512 |
|
511 | 513 | permissions: |
@@ -853,9 +855,13 @@ jobs: |
853 | 855 | run: | |
854 | 856 | if ${{ github.event_name == 'pull_request' }} |
855 | 857 | then |
856 | | - echo "This workflow ran for a pull request. We need stage-and-check, link-check, and netlify-preview to succeed, and deploy must be skipped" |
857 | | - if ${{ needs.stage-and-check.result != 'success' || needs.link-check.result != 'success' || needs.deploy.result != 'skipped' || needs.netlify-preview.result != 'success' }}; then exit 1; fi |
| 858 | + echo "This workflow ran for a pull request. We need stage-and-check and link-check to succeed, deploy must be skipped, and netlify-preview must succeed or fail (non-fatal on forks)" |
| 859 | + if ${{ needs.stage-and-check.result != 'success' || needs.link-check.result != 'success' || needs.deploy.result != 'skipped' || (needs.netlify-preview.result != 'success' && needs.netlify-preview.result != 'failure') }}; then exit 1; fi |
| 860 | + elif ${{ github.event_name == 'push' }} |
| 861 | + then |
| 862 | + echo "This workflow ran for a push. We need stage-and-check and link-check to succeed; deploy and netlify-preview must be skipped" |
| 863 | + if ${{ needs.stage-and-check.result != 'success' || needs.link-check.result != 'success' || needs.deploy.result != 'skipped' || needs.netlify-preview.result != 'skipped' }}; then exit 1; fi |
858 | 864 | else |
859 | | - echo "This workflow ran for a push. We need stage-and-check, link-check, and deploy to succeed; netlify-preview must be skipped" |
| 865 | + echo "This workflow ran on schedule. We need stage-and-check, link-check, and deploy to succeed; netlify-preview must be skipped" |
860 | 866 | if ${{ needs.stage-and-check.result != 'success' || needs.link-check.result != 'success' || needs.deploy.result != 'success' || needs.netlify-preview.result != 'skipped' }}; then exit 1; fi |
861 | 867 | fi |
0 commit comments