Skip to content

feat: replace sidebar Edit/Remove buttons with per-row icon actions (… #244

feat: replace sidebar Edit/Remove buttons with per-row icon actions (…

feat: replace sidebar Edit/Remove buttons with per-row icon actions (… #244

Workflow file for this run

name: Deploy LinkSim Pages
on:
push:
branches:
- staging
- main
workflow_dispatch:
inputs:
target:
description: "Deployment target"
required: true
default: "staging"
type: choice
options:
- staging
- prod-main
jobs:
deploy-staging:
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/staging') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'staging')
runs-on: ubuntu-latest
environment: staging
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: staging
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Deploy staging with guardrails
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
VITE_MAPTILER_KEY: ${{ secrets.VITE_MAPTILER_KEY }}
run: npm run deploy:staging
deploy-prod-main:
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'prod-main')
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
fetch-tags: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Resolve release tag
id: release_tag
run: |
VERSION="$(node -p "require('./package.json').version")"
echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT"
- name: Prepare release worktree
run: git worktree add --detach "$RUNNER_TEMP/linksim-release" "${{ steps.release_tag.outputs.tag }}"
- name: Install dependencies
working-directory: ${{ runner.temp }}/linksim-release
run: npm ci
- name: Validate release gate
working-directory: ${{ runner.temp }}/linksim-release
run: node scripts/validate-prod-release.mjs
- name: Deploy prod/main with guardrails
working-directory: ${{ runner.temp }}/linksim-release
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
VITE_MAPTILER_KEY: ${{ secrets.VITE_MAPTILER_KEY }}
DEPLOY_VERIFY_COMMIT: ${{ github.sha }}
run: npm run build:bundle && npm run build:verify && node "$GITHUB_WORKSPACE/scripts/deploy-pages-safe.mjs" --target prod-main