Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created May 19, 2021 19:37
Show Gist options
  • Save xeoncross/4a4fd6119804eb15e90353dde2df9e70 to your computer and use it in GitHub Desktop.
Save xeoncross/4a4fd6119804eb15e90353dde2df9e70 to your computer and use it in GitHub Desktop.
https://linc.sh utilizes the neat idea of auto-deployed branches for every push

Cloudflare workers + auto deployments of staging branches

Using github actions to create the wrangler.toml domain name would let us use the default commit sha or branch name as the subdomain.

Inside the workers-deploy.yml you could build the domain name using the github action vars:

echo "[env.production]\nname=\"${GITHUB_REF}.example.com\"" > ~/.wrangler/config/domain.toml

Untested, I might be missing something here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment