Skip to content
Open
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
9 changes: 7 additions & 2 deletions .github/workflows/docs_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ permissions:
contents: write
pull-requests: write

concurrency:
group: docs-deploy-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}
cancel-in-progress: true

jobs:
deploy:
name: Publish docs to GitHub Pages
runs-on: ubuntu-24.04
# Prevent the job from running on forked PRs, for security reasons.
if: |
(github.event_name == 'push' && github.ref_name == 'main') ||
(github.repository_owner == github.event.pull_request.head.repo.owner.login)
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.repository_owner == github.event.pull_request.head.repo.owner.login)
env:
PREVIEW: ${{ !(github.event_name == 'push' && github.ref_name == 'main') }}
PREVIEW: ${{ github.event_name == 'pull_request' }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not mean a manual dispatch does a real publication? IMO that should not be possible unless we merge into main. What's the motivation behind the condition change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Yesterday I merged the update release PR and another docs change PR (to update the debugshell page). These triggered 2 gh-pages publish jobs which they raced and as a result the release to main docs got published but my changes to the debugshell docs didn't (you can visit the docs->next and check the debugshell page). The docs will be updated when some other update to main touches the docs but I don't see why couldn't we dispatch the workflow ourselves.

SET: base
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
Loading