Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Update page - help-for-individuals-and-families.html #2928

Update page - help-for-individuals-and-families.html

Update page - help-for-individuals-and-families.html #2928

Workflow file for this run

name: Staging deploy - AWS
on:
schedule:
# run around 9:00am on Mondays, 3:55 on Wednesdays, 7:55 Thurs
- cron: '0 17 * * Mon'
- cron: '55 23 * * Wed'
- cron: '55 15 * * Thu'
push:
branches:
- staging
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to call this workflow from another workflow -- see equity_deploy_staging.yml
workflow_call:
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: staging
submodules: true
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: staging_aws.yml
- name: Build 11ty
run: |
npm install
npm run build:staging
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm test
run: |
npm run test:setup
npm test
env:
CI: true
# Push built site files to S3 production bucket
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
# Push built site files to S3 production bucket
- name: Deploy to S3
run: aws s3 sync --follow-symlinks --delete ./docs s3://staging.covid19.ca.gov
#
# Invalidate Cloudfront production distribution (everything under data)
- name: invalidate Cloudfront
run: AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id E17SNE7QRMFCI3 --paths "/*"