Staging is meant to show what main holds, but nobody has deployed since Sam took the deploy out of CI. Continuous delivery fixes that: main is always ready to release, and every change that passes deploys to staging by itself. (Continuous deployment goes one step further, straight to production.)
The shop's deploy.sh asks the deploy service to run an image on staging or production. A deploy takes about 20 seconds. Add a job that deploys the image this run pushed:
deploy:
needs: image
if: github.ref == 'refs/heads/main'
environment: staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: ./deploy.sh staging registry.monster.market/shop:${{ github.sha }}
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}The staging environment holds its own DEPLOY_TOKEN already.
curl
Fetches a page and prints it. Each shop's page says which image it runs.
curl https://staging.monster.marketObjectives
- What does staging charge for a goblin right now?
- Staging follows main.