Skip to content

Fix documentation deployment (switch to HTTPS via GITHUB_TOKEN)#142

Merged
Cardoza2 merged 2 commits intomasterfrom
fix/documentation
Mar 27, 2026
Merged

Fix documentation deployment (switch to HTTPS via GITHUB_TOKEN)#142
Cardoza2 merged 2 commits intomasterfrom
fix/documentation

Conversation

@Cardoza2
Copy link
Copy Markdown
Member

Summary

  • Removes DOCUMENTER_KEY from the workflow env — its presence caused Documenter to use the SSH code path, which failed with git@github.com: Permission denied (publickey) since no valid deploy key was configured
  • Adds if: github.event_name != 'pull_request' guard so deployment is skipped on PRs (docs still build to catch errors)
  • Updates actions/checkout@v2@v4 and julia-actions/setup-julia@v1@v2
  • Moves PYTHON: "" into the build step (needed since make.jl calls Plots.pyplot())
  • Adds comments explaining the auth strategy so future maintainers know no additional secrets need to be configured

Test plan

  • Merge to master and confirm the Documentation workflow completes without the git fetch upstream SSH error
  • Confirm gh-pages branch is updated and docs appear at the expected URL
  • Open a test PR and confirm the build step runs but the deploy step is skipped

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the GitHub Actions documentation deployment path by switching Documenter to use GITHUB_TOKEN (HTTPS) rather than the SSH deploy-key path, and updates workflow dependencies accordingly.

Changes:

  • Update docs workflow to use actions/checkout@v4 and julia-actions/setup-julia@v2.
  • Remove DOCUMENTER_KEY from the docs deploy environment and rely on GITHUB_TOKEN.
  • Add ignore rules for docs build artifacts and Claude-related local files.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
.gitignore Ignores docs/build/ and Claude-related local artifacts.
.github/workflows/Documentation.yml Switches docs deployment auth strategy to HTTPS via GITHUB_TOKEN and updates action versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +28 to +31
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHON: ""
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Because this workflow runs on pull_request and the job requests contents: write, a PR from a branch in the same repo would execute untrusted code with a write-capable GITHUB_TOKEN. Consider restructuring into two jobs: a PR-safe build job with read-only permissions, and a deploy job (push/tag only) that has contents: write and pushes to gh-pages. This also aligns with separating build vs deploy logic.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Cardoza2 Cardoza2 merged commit 8541187 into master Mar 27, 2026
8 checks passed
@Cardoza2 Cardoza2 deleted the fix/documentation branch March 28, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants