-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.08 KB
/
push-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
43
44
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
env:
NODE_ENV: nonlive
permissions:
contents: read
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
if: >-
!startsWith(github.event.head_commit.message, 'Initial commit') &&
!startsWith(github.event.head_commit.message, '🤖') &&
!contains(github.event.head_commit.message, '[skip ci]')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: yarn
- run: yarn
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_DEPLOY_ROLE }}
aws-region: ${{ vars.AWS_REGION }}
- run: yarn deploy --stage $NODE_ENV
env:
GH_APP_URL: ${{ vars.GH_APP_URL }}
GH_APP_ID: ${{ vars.GH_APP_ID }}
GH_CLIENT_ID: ${{ vars.GH_CLIENT_ID }}
GH_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }}
GH_PRIVATE_KEY: ${{ secrets.GH_PRIVATE_KEY }}
GH_WEBHOOK_SECRET: ${{ secrets.GH_WEBHOOK_SECRET }}