Establish deployment pipeline
Closed this issue · 5 comments
We’ll need to be able to manually build and deploy the site, and also have builds get triggered from WordPress when new posts are ready.
- identify target infrastructure (Platform.sh, GitHub Pages, Vercel, etc.)
- identify CDN (Cloudflare, etc.)
- establish pipeline (probably with GitHub Actions)
I think the working plan is that we’ll...
- Build the site with GitHub Actions.
- Commit the built files to an intermediary repository.
- Have Platform.sh listen to the build repo to pull and host changes.
- Use Cloudflare for fully-static edge caching on the apex domain.
I’ve got a GitHub Actions workflow running that should be easy to adjust for deployment infrastructure.
It separates its work into two distinct jobs, build
and push
. Example: https://github.com/drud/ddev.com-front-end/actions/runs/4029253773
The build job generates the site and uploads the result as an artifact. The push job then downloads that artifact and commits it to https://github.com/drud/ddev.com-build, where my current VPS listens for commits, pulls them, and uses a simple shell script to purge Cloudflare’s cache.
We can do the same thing from Platform.sh when it’s time, and this could easily be adapted to include tests or future workflow enhancements.
@rfay Drawing your attention to this in case it was too sneaky and you have any feedback. Seems to be working well!
Thanks!
I finally subscribed to everything on this repo, sorry that I hadn't done that before.
No need to apologize. I’m pretty chatty with myself so I imagine it’ll be a bittersweet subscription.