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 "awscliv2.zip" unzip -q awscliv2.zip sudo ./aws/install - 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: | # 저장소 이름을 사이트 ID로 사용 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"