opensafely / opensafely/documentation
Enable site preview for Dependabot builds
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48
- Forks
- 10
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 17
Description
We're now building the site via GitHub Actions and pushing that to Cloudflare Pages ourselves to deploy the site, following #921.
This requires secrets to deploy. Dependabot does not have access to these secrets (#929). #930 simply skips the publish step for Dependabot PRs, which means you don't get an automatic preview. This isn't too big a problem as most changes are likely fairly innocuous, provided the site builds.
If we want to resolve it, we would either need to:
- use
pull_request_targetas the workflow trigger (⚠️ which has security implications which we would be better avoiding) - or (probably better) separating build and deploy steps by building the site and uploading artifacts in one workflow, then triggering deployment of those artifacts via
workflow_run, with secrets access.
Alternatively, if Cloudflare Pages ever improves to allow builds with newer Python, we could consider allowing Cloudflare Pages to do the build and deploy. This removes this problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the GitHub Actions workflow introduced by #921 and the Dependabot secret limitation described in #929. Compare separating the build and artifact upload from deployment via workflow_run with the other options, including their security implications. Done means Dependabot pull requests receive site previews without exposing deployment secrets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- ci-cd, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100