Skip to content

Release to Production #1

Release to Production

Release to Production #1

name: Release to Production
# Production publishes from the `production` branch (set as the deployment
# branch in Mintlify). `main` is the staging line. This workflow advances
# `production` to the current `main`, which is what triggers a prod deploy.
on:
# Manual promotion only — run from the Actions tab.
workflow_dispatch:
permissions:
contents: write
# Prevent overlapping promotions from racing on the production ref.
concurrency:
group: promote-to-production
cancel-in-progress: false
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Fast-forward production to main
run: |
sha=$(git rev-parse HEAD)
echo "Promoting main ($sha) to production"
# Non-force push: fails if production has diverged (e.g. a direct
# hotfix on production not yet in main), which is a deliberate guard.
git push origin "HEAD:production"
echo "### ✅ Promoted \`main\` (\`$sha\`) to \`production\`" >> "$GITHUB_STEP_SUMMARY"