Skip to content

Commit

Permalink
ci(backups): Add generated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Mar 15, 2024
1 parent 5bf0178 commit d09f72f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/backups.yml
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: './'

0 comments on commit d09f72f

Please sign in to comment.