Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,27 @@ name: Deploy to Cloudflare Pages
on:
workflow_dispatch:
inputs:
env_name:
description: 'Environment to deploy'
required: true
default: 'dev'
type: choice
options:
- dev
- prod
calver_tag:
description: 'CalVer tag to promote to prod (leave blank for dev)'
description: "CalVer tag to promote to prod (leave blank for dev)"
required: false
default: ''
default: ""

permissions:
contents: write
deployments: write

jobs:
release-dev:
if: ${{ github.event.inputs.env_name == 'dev' }}
if: ${{ github.event.inputs.calver_tag == '' }}
runs-on: ubuntu-latest
outputs:
calver_tag: ${{ steps.setver.outputs.calver_tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm run build

Expand Down Expand Up @@ -64,7 +56,7 @@ jobs:
githubToken: ${{ secrets.GITHUB_TOKEN }}

promote-to-prod:
if: ${{ github.event.inputs.env_name == 'prod' && github.event.inputs.calver_tag != '' }}
if: ${{ github.event.inputs.calver_tag != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down