Merge pull request #222 from BlockPILabs/stage #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 上传至cloudflare R2 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v1.10 | |
| - stage | |
| - testnet | |
| - dev | |
| jobs: | |
| upload: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Upload to Cloudflare R2 | |
| run: | | |
| aws s3 sync . s3://${{ secrets.R2_BUCKET_NAME }}/${{ secrets.R2_PREFIX_DIR }}/${{ github.ref_name }}/ \ | |
| --endpoint-url=${{ secrets.R2_ENDPOINT_URL }} \ | |
| --delete \ | |
| --exclude ".git/*" \ | |
| --exclude ".github/*" \ | |
| --exclude "awscli-bundle/*" \ | |
| --exclude "awscli-bundle.zip" \ | |
| --exact-timestamps | |
| env: | |
| R2_BUCKET_NAME: ${{ secrets.R2_BUCKET_NAME }} | |
| R2_ENDPOINT_URL: ${{ secrets.R2_ENDPOINT_URL }} | |
| R2_PREFIX_DIR: ${{ secrets.R2_PREFIX_DIR || '' }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: wnam |