Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szikszail/aws-github-pages
This project sets custom domains for GitHub Pages of the repositories, including creating them in AWS Route53.
https://github.com/szikszail/aws-github-pages
Last synced: about 1 month ago
JSON representation
This project sets custom domains for GitHub Pages of the repositories, including creating them in AWS Route53.
- Host: GitHub
- URL: https://github.com/szikszail/aws-github-pages
- Owner: szikszail
- Created: 2022-03-09T10:13:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T04:29:24.000Z (about 2 months ago)
- Last Synced: 2024-09-17T07:32:04.787Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 745 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aws-github-pages
This project sets custom domains for GitHub Pages of the repositories, including creating them in AWS Route53.
## Prerequisites
1. AWS Account
2. A Hosted Zone in AWS for the domain you chose to use## Usage
1. Fork this repository
2. Set the following **Secrets** in your the forked GitHub repository ([Encrypted Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets)):
1. `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` to an access key of your AWS account
2. `AWS_REGION` to an AWS region you chose to use
3. `GH_ACCESS_TOKEN` to a GitHub Personal Access Token with `repo` scope set
3. Update `settings.json` with your account name and domain to use (*repositories should be empty or ignored, the scripts will overwrite it*)
4. **IMPORTANT** Update stack name in `bin/aws-github-pages.ts` to make it unique
5. Run the `Deploy` action when you wish, which will:
1. Read all your repositories and collect all **public** and **owned** ones that have **GitHub Pages** enabled or has `gh-pages` branch
2. Deploy the necessary `CNAME` records to the domain's hosted zone in AWS
(i.e. `CNAME {repository-name}.{domain}` to `{account}.github.io`)
1. Updates the repositories:
1. Enables pages if it is not enabled yet and there is a `gh-pages` branch
2. Sets custom domain for the pages
3. Waits for HTTPS certificate for the custom domain and enabled **HTTPS enforced**
4. Sets home page for the repository