Skip to content

Merge pull request #21 from marcbacchi/feat-1 #77

Merge pull request #21 from marcbacchi/feat-1

Merge pull request #21 from marcbacchi/feat-1 #77

Workflow file for this run

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