-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.24 KB
/
main.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
name: Deploy API & UI
permissions:
id-token: write # required to use OIDC authentication
contents: read # required to checkout the code from the repo
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::592808278931:role/GithubDeployRole
role-duration-seconds: 900 # the ttl of the session, in seconds.
aws-region: us-east-1 # use your region here.
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm run deploy:cd
env:
WARCRAFT_LOGS_CLIENT_ID: '${{ secrets.WARCRAFT_LOGS_CLIENT_ID }}'
WARCRAFT_LOGS_CLIENT_SECRET: '${{ secrets.WARCRAFT_LOGS_CLIENT_SECRET }}'
CALLBACK_URLS: '${{ secrets.CALLBACK_URLS }}'
GOOGLE_CLIENT_ID: '${{ secrets.GOOGLE_CLIENT_ID }}'
GOOGLE_CLIENT_SECRET: '${{ secrets.GOOGLE_CLIENT_SECRET }}'