Files
multisite-demo/.gitea/workflows/deploy.yml
kappa d3040f473f
All checks were successful
Deploy to CF Multisite / deploy (push) Successful in 2m53s
Fix: Install AWS CLI to /tmp to avoid uploading it
2026-01-29 00:43:10 +09:00

37 lines
1.0 KiB
YAML

name: Deploy to CF Multisite
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install AWS CLI
run: |
curl -sL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
cd /tmp && unzip -q awscliv2.zip && sudo ./aws/install
aws --version
- name: Deploy to R2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_KEY }}
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
run: |
SITE_ID="${{ github.event.repository.name }}"
aws s3 sync . "s3://multisite-bucket/sites/${SITE_ID}/" \
--endpoint-url "${R2_ENDPOINT}" \
--region auto \
--exclude ".git/*" \
--exclude ".gitea/*" \
--exclude "README.md" \
--delete
echo "Deployed to: https://${SITE_ID}.actions.it.com"