-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (38 loc) · 1.2 KB
/
deploy_prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
---
name: Deploy API and ETL pipeline to production
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
pull-requests: write
deployments: write
repository-projects: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
jobs:
deploy_prod:
name: Deploy API to production
runs-on: ubuntu-latest
environment:
name: production
url: https://anteaterapi.com
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-and-pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Deploy API to production
working-directory: ./apps/api
run: pnpm run deploy --route anteaterapi.com/*
- name: Deploy ETL pipeline to production
run: pnpm --filter "./apps/data-pipeline/**" run deploy