update github action #9
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
name: Deploy production | ||
on: | ||
push: | ||
branches: [main] | ||
jobs: | ||
deploy-production: | ||
if: secrets.PREVIEW_DATABASE_URL | ||
Check failure on line 9 in .github/workflows/deploy-production.yml GitHub Actions / Deploy productionInvalid workflow file
|
||
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 | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
- run: pnpm run deploy:production | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
- uses: nathanvaughn/actions-cloudflare-purge@master | ||
with: | ||
cf_zone: ${{ secrets.CLOUDFLARE_ZONE_ID }} | ||
cf_auth: ${{ secrets.CLOUDFLARE_API_TOKEN }} |