-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (38 loc) · 1.04 KB
/
deploy.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
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
check:
runs-on: ubuntu-latest
outputs:
inputsChecked: ${{ steps.github_token_gate.outputs.inputsChecked }}
steps:
- uses: svrooij/secret-gate-action@v1
id: github_token_gate
with:
inputsToCheck: 'token'
env:
token: ${{ secrets.DOCS_PRIVATE_ACCESS_TOKEN }}
deploy:
# skip if user has not access to the token
if: needs.check.outputs.inputsChecked == 'true'
needs: check
runs-on: ubuntu-latest
steps:
# TODO(petethepig): make it run only when tests passed
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: '18.12'
- name: deploy
if: ${{ github.event_name != 'pull_request' }}
run: make deploy
env:
NODE_OPTIONS: --openssl-legacy-provider