Skip to content

Commit de84bc3

Browse files
authored
Merge pull request #15028 from nextcloud/workflow/update-.github/workflows/sphinxbuild.yml-stable32
[stable32] chore: update `.github/workflows/sphinxbuild.yml` from the master branch
2 parents aeca971 + e3e0b05 commit de84bc3

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches:
77
- master
88
- stable*
9+
schedule:
10+
- cron: '0 2 * * *' # 02:00 UTC daily — full build + deploy
911

1012
permissions:
1113
contents: read
@@ -505,7 +507,7 @@ jobs:
505507
deploy:
506508
name: Deploy documentation for gh-pages
507509
needs: stage-and-check
508-
if: github.event_name == 'push'
510+
if: github.event_name == 'schedule'
509511
runs-on: ubuntu-latest
510512

511513
permissions:
@@ -853,9 +855,13 @@ jobs:
853855
run: |
854856
if ${{ github.event_name == 'pull_request' }}
855857
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
858864
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"
860866
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
861867
fi

0 commit comments

Comments
 (0)