Skip to content

Deploy docs to fluentmigrator/fluentmigrator.github.io repository#2185

Merged
PhenX merged 4 commits into
mainfrom
copilot/update-deploy-docs-workflow
Nov 22, 2025
Merged

Deploy docs to fluentmigrator/fluentmigrator.github.io repository#2185
PhenX merged 4 commits into
mainfrom
copilot/update-deploy-docs-workflow

Conversation

Copilot AI commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Updates the deploy-docs.yml workflow to publish documentation to the external fluentmigrator/fluentmigrator.github.io repository instead of the current repository's GitHub Pages.

Changes

  • Replace GitHub Pages deployment actions with peaceiris/actions-gh-pages@v4 configured for external repository deployment
  • Update permissions from pages: write, id-token: write to contents: write for cross-repository push access
  • Configure deployment target: fluentmigrator/fluentmigrator.github.io repository, main branch
  • Use deploy_key with secrets.ACTIONS_DEPLOY_KEY for authentication (required for external repository deployment)

Configuration

- name: Deploy to GitHub Pages
  uses: peaceiris/actions-gh-pages@v4
  with:
    deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
    publish_dir: ./docs-website/.vitepress/dist
    external_repository: fluentmigrator/fluentmigrator.github.io
    publish_branch: main

Setup Required

A deploy key must be generated and configured:

  1. Generate SSH key pair: ssh-keygen -t ed25519 -C "github-actions-deploy"
  2. Add the public key as a deploy key in the fluentmigrator/fluentmigrator.github.io repository (Settings → Deploy keys → Add deploy key, with write access enabled)
  3. Add the private key as a secret named ACTIONS_DEPLOY_KEY in this repository (Settings → Secrets and variables → Actions → New repository secret)
Original prompt

Make a PR to update the deploy-docs.yml GH actions workflow so that it publishes the docs to the fluentmigrator/fluentmigrator.github.io repositpory


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update deploy-docs.yml to publish docs to GitHub repository Deploy docs to fluentmigrator/fluentmigrator.github.io repository Nov 19, 2025
Copilot AI requested a review from PhenX November 19, 2025 21:23
@PhenX
PhenX marked this pull request as ready for review November 19, 2025 21:33
@PhenX
PhenX requested a review from jzabroski as a code owner November 19, 2025 21:33
@github-actions

github-actions Bot commented Nov 19, 2025

Copy link
Copy Markdown

Test Results

    2 files  ±0      2 suites  ±0   36s ⏱️ +5s
5 344 tests ±0  5 012 ✅ ±0  332 💤 ±0  0 ❌ ±0 
5 825 runs  ±0  5 229 ✅ ±0  596 💤 ±0  0 ❌ ±0 

Results for commit ee358e9. ± Comparison against base commit dc07e1c.

♻️ This comment has been updated with latest results.

@PhenX

PhenX commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator

@copilot I got this error while running the workflow :

[INFO] setup GITHUB_TOKEN
Error: Action failed with "The generated GITHUB_TOKEN (github_token) does not support to push to an external repository.
Use deploy_key or personal_token.

Copilot AI commented Nov 19, 2025

Copy link
Copy Markdown
Contributor Author

@copilot I got this error while running the workflow :

[INFO] setup GITHUB_TOKEN
...

Fixed in commit af718d1. Changed from github_token to personal_token with secrets.GH_PAT.

You'll need to create a Personal Access Token with repo scope and add it as a secret named GH_PAT in the repository settings (Settings → Secrets and variables → Actions → New repository secret).

@PhenX

PhenX commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator

@copilot I prefer using deploy keys

Copilot AI commented Nov 19, 2025

Copy link
Copy Markdown
Contributor Author

@copilot I prefer using deploy keys

Changed to use deploy_key in commit ee358e9.

Setup steps:

  1. Generate SSH key: ssh-keygen -t ed25519 -C "github-actions-deploy"
  2. Add public key as deploy key in fluentmigrator/fluentmigrator.github.io repo (Settings → Deploy keys, enable write access)
  3. Add private key as secret ACTIONS_DEPLOY_KEY in this repo (Settings → Secrets and variables → Actions)

@PhenX PhenX left a comment

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.

I added the required deploy token and it works

@PhenX
PhenX merged commit fcc42a9 into main Nov 22, 2025
5 of 7 checks passed
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