You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we call /activate the commit-sha /activate is called for will be stored and and the router component can pick up this SHA to proxy calls to the Domain to the commit-sha folder in our S3 bucket
After /activate was completed, we can trigger the execution of a garbage collector to clean up older commit SHA folders to save storage space in S3
API Endpoints
PUT /upload
Upload a zip archive of the web-page
PUT /activate/{commit-sha}
"Activate" a commit-sha
Config Structure
spec:
domain: specht-labs.de# Configure the S3 bucket where the website is hosted inbucket:
url: <s3 bucket URI>application_id: ENV(‘APPLICATION_ID’) # use ENV() as an expression to indicate reading the value from env-varssecret: ENV(‘SECRET_NAME’)# specify a (default) retention period (how many commit websites to keep)history: 10# Grant access to repositories to use this domainallowed:
# Option 1: allow an entire org
- https://github.com/SpechtLabs/*# Option 2: fine graned control to individual repositories
- https://github.com/SpechtLabs/spechtlabs.github.io# Configure how sub-domains are handed out# {{ .Environment }} - the environment as sent by GHA# {{ .RepoName }} - the name of the Git repository # {{ .Domain }} - the Domain name configured at the top of the pagesub-domains:
'spechtlabs.github.io':
# pattern supports go-templatepattern: '{{ if len(.Environment) gt 0 }} {{ .Environment }}.{{ end }}{{ .Domain }}'history: 15# keep the latest 15 commits (except the 'active' commit)'*':
pattern: '{{ .RepoName }}.{{ .Domain }}'