forked from LD4P/qa_server_aws_deploy
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.22 KB
/
sync-s3-int.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# When the dev branch changes, sync config files with integration S3 bucket.
# * copy config/authorities to S3/config/authorities
# * copy config/locale to S3/config/locale
name: sync-s3-int
on:
workflow_dispatch: # allow for manually running through Actions tab
push:
branches: [ dev ] # auto-run when files in listed paths change in the dev branch
paths:
- 'config/authorities/**'
- 'config/locales/**'
jobs:
s3_update:
runs-on: ubuntu-latest
environment: integration
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:
# reload-auths-int 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