fix: bruh moment https://github.com/orgs/community/discussions/18055 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
Creates a preview deployment for the head branch when a PR is made. | ||
--- | ||
name: Deploy PR to staging | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- unlabeled | ||
permissions: | ||
id-token: write | ||
contents: read | ||
deployments: write | ||
pull-requests: write | ||
concurrency: | ||
group: ${{ github.head_ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
deploy: | ||
if: (!contains(github.event.pull_request.labels.*.name, 'no deploy')) | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUM: ${{ github.event.pull_request.number }} | ||
NODE_ENV: staging | ||
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: us-east-1 | ||
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL_STAGING }} | ||
HOSTED_ZONE_ID: ${{ secrets.HOSTED_ZONE_ID }} | ||
steps: | ||
- name: Check out codebase | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: 8 | ||
run_install: false | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Build AntStack | ||
run: pnpm build --filter="ant-stack" | ||
- name: Install dependencies (again) | ||
run: pnpm install --frozen-lockfile | ||
- name: Build assets | ||
run: pnpm build | ||
- name: Deploy stacks | ||
run: pnpm ant-stack deploy |