Skip to content

ci: fix github pages publishing#691

Merged
igorls merged 1 commit intodevelopfrom
codex-github-pages-publishing
Apr 12, 2026
Merged

ci: fix github pages publishing#691
igorls merged 1 commit intodevelopfrom
codex-github-pages-publishing

Conversation

@igorls
Copy link
Copy Markdown
Member

@igorls igorls commented Apr 12, 2026

This pull request updates the documentation deployment workflow and related configuration to support deployments from both the main and develop branches, improves deployment robustness, and simplifies environment management. The key changes are grouped below:

GitHub Actions workflow improvements:

  • The .github/workflows/deploy-docs.yml workflow now triggers on pushes to both main and develop branches and on changes to the workflow file itself. It also enables manual dispatch.
  • Concurrency is improved by scoping deployments to the branch (group: pages-${{ github.ref }}) and enabling cancellation of in-progress runs.
  • The build and deploy jobs now explicitly set required permissions for better security and compatibility.
  • The build step passes the deployment base path and current branch to the docs build process, ensuring correct URLs and edit links.
  • The deploy job is restricted to run only on main or develop branches.

Documentation configuration enhancements:

  • The website/.vitepress/config.mts file now normalizes the docs base path and dynamically sets the edit link branch based on the deployment environment, ensuring correct navigation and edit links for both branches. [1] [2]

Cleanup and simplification:

  • The legacy netlify.toml configuration is removed, as deployment is now handled exclusively via GitHub Actions.

Copilot AI review requested due to automatic review settings April 12, 2026 08:57
@igorls igorls merged commit 74e5bf6 into develop Apr 12, 2026
8 checks passed
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

Updates the documentation deployment pipeline to publish GitHub Pages from both main and develop, and aligns VitePress configuration with branch-aware deployment settings.

Changes:

  • Extend deploy-docs.yml triggers to main and develop, add concurrency scoping/cancellation, and pass base path + branch info into the docs build.
  • Make VitePress base configurable via env with normalization, and make edit links point to the deployed branch.
  • Remove legacy Netlify deployment configuration.

Reviewed changes

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

File Description
.github/workflows/deploy-docs.yml Expands triggers, adds branch-scoped concurrency, configures Pages, and gates deploys to main/develop.
website/.vitepress/config.mts Normalizes base from env and makes edit links branch-aware via DOCS_EDIT_BRANCH.
netlify.toml Removes Netlify build/publish configuration since deployments are now via GitHub Pages.

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

Comment on lines 22 to +33
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure GitHub Pages
id: pages
uses: actions/configure-pages@v5

Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The build job sets permissions: contents: read, but it also runs actions/configure-pages@v5. Job-level permissions override the workflow-level pages: write, so configure-pages may fail to read/compute base_path due to missing Pages permission. Consider adding pages: write (or removing the job-level override) for the build job so steps.pages.outputs.base_path is reliably available.

Copilot uses AI. Check for mistakes.
return '/'
}

return base.endsWith('/') ? base : `${base}/`
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

normalizeBase ensures a trailing slash but doesn't enforce a leading slash. VitePress expects base to start and end with /, so a value like mempalace would normalize to mempalace/ and produce broken asset/route URLs. Consider normalizing to always add a leading / when missing (and still ensure trailing /).

Suggested change
return base.endsWith('/') ? base : `${base}/`
const withLeadingSlash = base.startsWith('/') ? base : `/${base}`
return withLeadingSlash.endsWith('/') ? withLeadingSlash : `${withLeadingSlash}/`

Copilot uses AI. Check for mistakes.
@igorls igorls deleted the codex-github-pages-publishing branch April 13, 2026 22:37
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