Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/sphinxbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ jobs:
deploy:
name: Deploy documentation for gh-pages
needs: stage-and-check
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest

permissions:
Expand Down Expand Up @@ -663,15 +663,14 @@ jobs:

git fetch origin ${{ github.event.repository.default_branch }} ${{ github.ref_name }}

# git show, not checkout: gh-pages has its own copies at the root, leave them alone
# Add go.php redirect from main branch
git checkout origin/${{ github.event.repository.default_branch }} -- go.php/index.html
mkdir -p server/${branch}/go.php
mv go.php/index.html server/${branch}/go.php/index.html
git show origin/${{ github.event.repository.default_branch }}:go.php/index.html > server/${branch}/go.php/index.html

# Add user_manual english redirect
git checkout origin/${{ github.ref_name }} -- user_manual/index.html
mkdir -p server/${branch}/user_manual
mv user_manual/index.html server/${branch}/user_manual/index.html
git show origin/${{ github.ref_name }}:user_manual/index.html > server/${branch}/user_manual/index.html

# Also copy to versioned folder if applicable
if [ -n "${additional}" ]; then
Expand Down Expand Up @@ -911,11 +910,7 @@ jobs:
then
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)"
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
elif ${{ github.event_name == 'push' }}
then
echo "This workflow ran for a push. We need stage-and-check and link-check to succeed; deploy and netlify-preview must be skipped"
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
else
echo "This workflow ran on schedule or workflow_dispatch. We need stage-and-check, link-check, and deploy to succeed; netlify-preview must be skipped"
echo "This workflow ran for a push or workflow_dispatch. We need stage-and-check, link-check, and deploy to succeed; netlify-preview must be skipped"
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
fi
Loading