Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,23 @@ jobs:
export VITE_BASE_URL="${CDN_ORIGIN}/${asset_prefix}"
echo "VITE_BASE_URL=${VITE_BASE_URL}" >> "$GITHUB_ENV"
echo "prefix=${asset_prefix}" >> "$GITHUB_OUTPUT"
echo "base-url=${VITE_BASE_URL}" >> "$GITHUB_OUTPUT"
calcit calcit.cirru js
node --test scripts/upgrade.test.mjs
yarn vite build --base="$VITE_BASE_URL"

- name: Verify CDN asset references
run: node scripts/verify-cdn-build.mjs

- name: Upload static assets to COS
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
uses: worktools/cos-upload-action@0ce57b26b03dbdd27a4a544a06d453415932c62d # v1.0.0
uses: worktools/cos-upload-action@a8222e494b880b775cb8fe1ce9cc974d3ffc84cf # v1.1.0
with:
source-dir: dist
bucket: ${{ secrets.COS_BUCKET }}
region: ap-shanghai
prefix: ${{ steps.asset-path.outputs.prefix }}
public-base-url: ${{ steps.asset-path.outputs.base-url }}
secret-id: ${{ secrets.COS_SECRET_ID }}
secret-key: ${{ secrets.COS_SECRET_KEY }}

- name: Verify uploaded CDN assets
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
run: node scripts/verify-cdn-build.mjs --remote

- name: Deploy to server
id: deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down
64 changes: 0 additions & 64 deletions scripts/verify-cdn-build.mjs

This file was deleted.

Loading