Skip to content

Commit

Permalink
Try fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaka14732 committed Sep 4, 2024
1 parent 7e48039 commit 515ce1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,16 @@ jobs:
node-version: 22
- run: npm ci
- run: npm test
# FIXME CORS broken, building non-COS version for now
#- run: npm run build:cos
- run: npm run build
# FIXME CORS broken, deploying everything on GH Pages for now
#- name: Install coscmd
# run: sudo pip install coscmd
#- name: Configure coscmd
# env:
# SECRET_ID: ${{ secrets.SecretId }}
# SECRET_KEY: ${{ secrets.SecretKey }}
# BUCKET: ${{ secrets.Bucket }}
# REGION: ${{ secrets.Region }}
# run: coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
#- name: Publish static files to COS
# run: |
# cd ./build/
# coscmd upload -rs --delete -f ./ / --ignore index.html
# rm -rf assets
- run: npm run build:cos
- name: Install coscmd
run: sudo pip install coscmd
- name: Configure coscmd
run: coscmd config -a ${{ secrets.SecretId }} -s $${{ secrets.SecretKey }} -b $${{ vars.BUCKET }} -r $${{ vars.REGION }}
- name: Publish static files to COS
run: |
cd ./build/
coscmd upload -rs --delete -f ./ / --ignore index.html
rm -rf !(index.html)
- name: Publish to GitHub Pages
run: |
# Create a temporary directory
Expand Down
2 changes: 1 addition & 1 deletion vite.cos.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeConfig } from "./vite.config";

// Same as base config but prefix each asset path in index.html with this location
export default makeConfig("https://qieyun-autoderiver-1305783649.file.myqcloud.com/");
export default makeConfig("https://autoderiver-1305783649.cos.accelerate.myqcloud.com/");

0 comments on commit 515ce1f

Please sign in to comment.