Skip to content

Commit

Permalink
build: 👷 test build to cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
AruSeito committed Feb 19, 2024
1 parent c305a01 commit 094f3cc
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build-cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to k8s
on:
push:
branches:
- develop
- feat/upload_to_cdn

env:
ILLA_GOOGLE_MAP_KEY: ${{ secrets.ILLA_GOOGLE_MAP_KEY }}
Expand Down Expand Up @@ -48,15 +48,16 @@ jobs:
echo "Building for $GITHUB_REF_NAME branch,ILLA APP ENV is $ILLA_APP_ENV"
pnpm build-cloud
- name: Deploy to DigitalOcean Spaces
uses: s3-actions/[email protected]
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials
with:
args:
--acl public-read --follow-symlinks --delete --cache-control
aws-access-key-id: ${{ secrets.DO_SPACES_KEY }}
aws-secret-access-key: ${{ secrets.DO_SPACES_SECRET }}
aws-region: "sfo3"

- name: Upload to DigitalOcean Spaces
run: |
aws s3 sync ./apps/builder/dist s3://${{ secrets.DO_SPACES_BUCKET }} --endpoint-url https://$AWS_REGION.digitaloceanspaces.com --acl public-read --delete --cache-control
"public, max-age=31536000"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DO_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACES_SECRET }}
AWS_REGION: "sfo3"
S3_BUCKET: ${{ secrets.DO_SPACES_BUCKET }}
SOURCE_DIR: "./apps/builder/dist"
AWS_REGION: "sfo3" # 请确保这与上面匹配

0 comments on commit 094f3cc

Please sign in to comment.