20 lines
623 B
YAML
20 lines
623 B
YAML
name: Scheduled S3 Code Backup
|
|
on:
|
|
schedule:
|
|
# This cron expression means "At minute 0 past every 3rd hour"
|
|
- cron: '0 */3 * * *'
|
|
# It's also helpful to include workflow_dispatch so you can trigger it manually if needed
|
|
workflow_dispatch:
|
|
jobs:
|
|
backup-code:
|
|
runs-on: ubuntu-latest
|
|
container: node:22
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
- name: Install AWS CLI
|
|
run: |
|
|
apt-get update && apt-get install -y awscli
|
|
- name: Sync entire repository to S3 Backup Bucket
|
|
run: |
|
|
aws s3 sync . s3://forgeocodespace --delete
|