sync-s3-prod #7
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
# Manually sync config files from the main branch with production S3 bucket. | |
# * copy config/authorities to S3/config/authorities | |
# * copy config/locale to S3/config/locale | |
name: sync-s3-prod | |
on: | |
workflow_dispatch: # allow for manually running through Actions tab | |
# push: -- TURNED OFF -- | |
# branches: [ main ] # auto-run when files in listed paths change in the main branch | |
# paths: | |
# - 'config/authorities/**' | |
# - 'config/locales/**' | |
jobs: | |
s3_update: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@master | |
- uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --follow-symlinks --delete | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_REGION: 'us-east-1' | |
SOURCE_DIR: 'config' | |
DEST_DIR: 'config' | |
# wait_one_hour: # currently, reload-auths-prod is configured for manual trigger only -- TURNED OFF -- | |
# # reload-auths-prod workflow watches for the end of this workflow before reloading auths in the app | |
# needs: s3_update | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: technote-space/auto-cancel-redundant-workflow@v1 | |
# - name: wait-one-hour | |
# run: sleep 1h |