Skip to content

update github action #6

update github action

update github action #6

name: Deploy production
on:
push:
branches: [main]
jobs:
deploy-production:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: pnpm/action-setup@v2
- run: pnpm i
- run: pnpm run lint
- run: pnpm run typecheck
- run: pnpm run --filter @dinstack/api db:migrate
if: secrets.DATABASE_URL

Check failure on line 31 in .github/workflows/deploy-production.yml

View workflow run for this annotation

GitHub Actions / Deploy production

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-production.yml (Line: 31, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DATABASE_URL .github/workflows/deploy-production.yml (Line: 36, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.CLOUDFLARE_API_TOKEN
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- run: pnpm run deploy:production
if: secrets.CLOUDFLARE_API_TOKEN
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- uses: nathanvaughn/actions-cloudflare-purge@master
if: secrets.CLOUDFLARE_API_TOKEN && secrets.CLOUDFLARE_ZONE_ID
with:
cf_zone: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cf_auth: ${{ secrets.CLOUDFLARE_API_TOKEN }}