-
Notifications
You must be signed in to change notification settings - Fork 156
37 lines (33 loc) · 1.09 KB
/
deploy-s3-sandbox.yaml
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
name: AWS S3 sandbox
on:
pull_request:
types: [labeled]
jobs:
test-and-deploy-s3-sandbox:
if: ${{ github.event.label.name == 'deploy_s3_sandbox' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: node --version
- run: npm --version
- name: cache node modules
uses: actions/cache@v1
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-${{ hashFiles('package-lock.json') }}
npm-
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Bundle into single file
run: npm run webpack-bundle
- name: Upload to AWS sandbox S3 bucket
run: npm run upload
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SANDBOX_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SANDBOX_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_S3_PATH: redocly-sandbox-openapi-cli-dist