diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..bffdcfb --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,37 @@ +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" diff --git a/index.html b/index.html new file mode 100644 index 0000000..cbb49c7 --- /dev/null +++ b/index.html @@ -0,0 +1,62 @@ + + +
+ + +이 페이지는 Gitea Actions를 통해 자동 배포되었습니다.
+