-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.27 KB
/
deploy.yml
File metadata and controls
43 lines (37 loc) · 1.27 KB
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
name: 'Deployments'
on:
workflow_run:
workflows: ["Run Tests"]
branches: [ master]
types:
- completed
jobs:
build-and-upload:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.15]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{matrix.node-version}}
uses: actions/setup-node@v1
with:
node-version: ${{matrix.node-version}}
- run: |
npm install -g npq --ignore-scripts
npq install
npm run build-prod-s3
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- run: |
#aws s3 mb s3://${{ github.event.repository.name }}
aws s3 ls my-angular-template
aws s3 website s3://my-angular-template/ --index-document index.html --error-document index.html
aws s3api put-bucket-policy --bucket=my-angular-template --policy file://.github/workflows/policy.json
aws s3 sync docs s3://my-angular-template
aws s3 ls my-angular-template