Skip to content

Update packages from workflow run 19431934381 #16

Update packages from workflow run 19431934381

Update packages from workflow run 19431934381 #16

Workflow file for this run

name: Sync to Cloudflare R2
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch: {}
jobs:
sync:
name: Sync repository to Cloudflare R2
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python (para instalar awscli)
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install AWS CLI
run: |
python -m pip install --upgrade pip
pip install --upgrade awscli
- name: Sync to Cloudflare R2 (S3-compatible)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_BUCKET: ${{ secrets.R2_BUCKET }}
run: |
# endpoint R2 (substitui <account_id>)
ENDPOINT="https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com"
echo "Sincronizando para bucket: ${R2_BUCKET} via endpoint ${ENDPOINT}"
# Exclui arquivos do bucket que foram removidos no repo com --delete
# Ajuste --exclude/--include conforme necessário.
aws --endpoint-url "${ENDPOINT}" s3 sync . "s3://${R2_BUCKET}" \
--delete \
--exclude ".git/*" \
--exclude ".github/*" \
--exact-timestamps
echo "Sync concluído."