Fix USWDS watch and loading #2
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 Staging | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- 'doc/**' | |
- 'README.md' | |
jobs: | |
deploy: | |
name: Deploy to staging | |
runs-on: ubuntu-latest | |
environment: staging | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: Check for changes to Terraform | |
id: changed-terraform-files | |
uses: tj-actions/[email protected] | |
with: | |
files: | | |
terraform/shared | |
terraform/staging | |
- name: Terraform init | |
if: steps.changed-terraform-files.outputs.any_changed == 'true' | |
working-directory: terraform/staging | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} | |
run: terraform init | |
- name: Terraform apply | |
if: steps.changed-terraform-files.outputs.any_changed == 'true' | |
working-directory: terraform/staging | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.TERRAFORM_STATE_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }} | |
TF_VAR_cf_user: ${{ secrets.CF_USERNAME }} | |
TF_VAR_cf_password: ${{ secrets.CF_PASSWORD }} | |
run: terraform apply -auto-approve -input=false | |
- name: Deploy app | |
uses: 18F/cg-deploy-action@main | |
env: | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
with: | |
cf_username: ${{ secrets.CF_USERNAME }} | |
cf_password: ${{ secrets.CF_PASSWORD }} | |
cf_org: TKTK-cloud.gov-org-name | |
cf_space: staging | |
push_arguments: >- | |
--vars-file config/deployment/staging.yml | |
--var rails_master_key=$RAILS_MASTER_KEY |