-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (48 loc) · 1.57 KB
/
deploy-updater.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
51
52
53
54
55
name: Deploy Updater
on:
workflow_call:
inputs:
environment:
description: "GitHub environment name"
required: true
type: string
sst-stage:
description: "SST deployment stage"
required: true
type: string
permissions:
id-token: write
contents: read
packages: read
jobs:
deploy-updater:
name: Deploy Updater Service
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
# Concurrency group name ensures concurrent workflow runs wait for any in-progress job to finish
concurrency:
group: updater-${{ inputs.environment }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: '10.4.1'
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
- name: Deploy Updater
working-directory: ./apps/updater
run: pnpm sst deploy --stage ${{ inputs.sst-stage }}
env:
UPDATER_API_TOKEN: ${{ secrets.UPDATER_API_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }}
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}