-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
@@ -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" # 请确保这与上面匹配 |