-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bf0178
commit d09f72f
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Clone and Upload to S3 | ||
|
||
on: | ||
schedule: | ||
# Runs at 00:00 UTC every Sunday | ||
- cron: '0 0 * * 0' | ||
|
||
jobs: | ||
clone-and-upload: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout dev branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: dev | ||
|
||
- name: Zip dev branch | ||
run: zip -r dev.zip . | ||
|
||
- name: Upload dev branch to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read --follow-symlinks | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: 'us-west-1' # Your S3 bucket region | ||
SOURCE_DIR: './' | ||
|
||
- name: Checkout master branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
|
||
- name: Zip master branch | ||
run: zip -r master.zip . | ||
|
||
- name: Upload master branch to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read --follow-symlinks | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: 'us-west-1' # Your S3 bucket region | ||
SOURCE_DIR: './' |