-
Notifications
You must be signed in to change notification settings - Fork 2
Custom domain with GitHub Pages
Anthony Fok edited this page Jun 11, 2021
·
1 revision
Regarding the use of custom domain, and including subdirectories from other repos under the same domain:
- Use a GitHub workflow file.
- Build main site as usual.
- Checkout a pre-built site from other repo, e.g. the gh-pages branch of OpenDRR/documentation
- Copy the above (w/o .git directory) into _site/documentation
- Deploy with peaceiris/actions-gh-pages@v3 as before, with the cname setting pointing to the desired custom domain name, which ensures the file CNAME is generated for the final site. GitHub relies on this file for custom domain name to work. Without this, each deploy would clear the custom domain setting!
Demo at:
-
https://github.com/anthonyfok/test-top-level-custom-domain (source:
main
branch; deploys to:gh-pages
branch) - https://opendrr.musicasacra-zh.org/ (where opendrr.musicasacra-zh.org is a temporary spare domain for testing)
- https://opendrr.musicasacra-zh.org/documentation/
GitHub Actions log:
Note: This is definitely not the only way to do it, and probably not the best way either, but it is a proof-of-concept with minimal changes to existing repos.
Sprint Planning
|
Sprint Review
Wikis:
data
|
model-factory
|
opendrr-api
|
opendrr
|
python-env
|
riskprofiler-cms