Skip to content

Split GitHub workflows #2

Split GitHub workflows

Split GitHub workflows #2

Workflow file for this run

name: Deploy staging
on:
pull_request:
types:
- opened
- reopened
- synchronize
# do not cancel in progress, SST will be stuck in a "locked" state if cancelled mid-deployment
concurrency:
group: staging-${{ github.event.pull_request.number }}
jobs:
build_and_deploy:
name: Build and deploy
runs-on: ubuntu-latest
# don't run if labeled "no deploy" && don't run on PRs from forks
if: (!contains(github.event.pull_request.labels.*.name, 'no deploy')) && github.event.pull_request.head.repo.full_name == github.repository
environment:
name: staging-${{ github.event.pull_request.number }}
url: https://staging-${{ github.event.pull_request.number }}peterportal.org
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
- name: Install dependencies
run: pnpm install
env:
HUSKY: 0
- name: Build and deploy
uses: ./.github/actions/build-and-deploy
with:
NODE_ENV: staging
stage: staging-${{ github.event.pull_request.number }}
DATABASE_URL: ${{ secrets.DEV_DATABASE_URL }}