-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (53 loc) · 1.56 KB
/
runworkflow.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy Infra, Test API
on:
push:
branches:
- main
jobs:
terraform:
name: Terraform Infrastructure
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Init
id: init
run: terraform init
- name: plan
id: plan
run: terraform plan
- name: Manual Approval Checkpoint
uses: trstringer/[email protected]
with:
secret: ${{ github.TOKEN }}
minimum-approvals: 1
approvers: marcbacchi
- name: terraform apply
id: apply
run: terraform apply -auto-approve
job-sync-website:
name: sync website files to s3 bucket
runs-on: ubuntu-latest
needs: terraform
steps:
- uses: actions/checkout@master
- uses: marcbacchi/cloud-resume-challenge@main
with:
args: --acl public-read --follow-symlinks --delete --exclude '.git*/*'
env:
AWS_S3_BUCKET: ${{secrets.AWS_S3_BUCKET}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
# AWS_REGION: 'us-east-1' # optional: defaults to us-east-1
SOURCE_DIR: 'resume-site' # optional: defaults to entire repository
job-cypress:
name: Cypress Tests
runs-on: ubuntu-latest
needs: job-sync-website
container: cypress/included:9.5.0
steps:
- uses: actions/checkout@v1
- run: cypress run