Merge pull request #45 from arunlalp/master #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Infrastructure | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
tf_fmt: | |
name: Deploy Site | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v1 | |
- name: Terraform Init | |
uses: hashicorp/terraform-github-actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TF_ACTION_WORKING_DIR: 'terraform' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Terraform Validate | |
uses: hashicorp/terraform-github-actions/[email protected] | |
- name: Terraform Apply | |
uses: hashicorp/terraform-github-actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TF_ACTION_WORKING_DIR: 'terraform' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Sync S3 | |
uses: jakejarvis/s3-sync-action@master | |
env: | |
SOURCE_DIR: './src' | |
AWS_REGION: 'us-east-1' | |
AWS_S3_BUCKET: '[BUCKET_NAME_HERE]' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |