CI: Automated deployment of docs on GH Pages#1
Conversation
|
Great. |
Hi @tkstanczak 👋 This is quite doable! I am writing a CI workflow to do this using Surge, based on the Publish to surge.sh workflow. This pipelines runs only on workflow runs for now, but I will tweak it to run on PRs as well. I would request you to generate a Surge token. Please install the Surge CLI and generate a token by running I will make a commit now for this to happen :) |
* CI: Automated deployment of docs on GH Pages * FIX: Fix broken build on GHA * CI: Publish PR previews on Surge
Description
This PR:
gh-pagesbranch on every pushNote
Before merging this PR, an orphan
gh-pagesbranch should be configured. To create the orphan gh-pages branch:git checkout --orphan gh-pages git reset --hard git commit --allow-empty -m "Initializing gh-pages branch" git push origin gh-pages git checkout mainOnce the branch is pushed to GitHub, you have to go to the Settings page of the repository. In the section “GitHub Pages”, select
gh-pagesas the source. We can merge the PR then and allow it to build and push the website.In case the deployment fails, we might also need to configure the Branch Protection Rule. We need to have
Allow force pushesto permit force pushes for all users with push access.