Replaced the monolithic pipeline with three dedicated workflows: ci.yml (build on every push), cd.yml (manual deploy to staging or prod), and nightly.yml (scheduled build and deploy). This makes it easier to trigger deploys independently of builds and to diagnose failures.
25 lines
522 B
YAML
25 lines
522 B
YAML
name: CD
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
target:
|
|
description: "Deployment target"
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- local
|
|
- staging
|
|
- prod
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: site-${{ github.sha }}
|
|
path: blog/
|
|
- name: Deploy
|
|
run: nix shell nixpkgs#rsync --command ./deploy.sh ${{ inputs.target }}
|