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
6 changes: 4 additions & 2 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ jobs:

- name: Select frontend CDN path
id: asset-path
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
asset_prefix="${GITHUB_REPOSITORY}/"
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
asset_prefix="${GITHUB_REPOSITORY}/pr/"
asset_prefix="${GITHUB_REPOSITORY}/pr/${PR_NUMBER}/${GITHUB_RUN_ID}/${GITHUB_RUN_ATTEMPT}/"
fi
base_url="https://cos-sh.tiye.me/${asset_prefix}"
echo "VITE_BASE_URL=${base_url}" >> "$GITHUB_ENV"
Expand All @@ -85,7 +87,7 @@ jobs:
needs: test
runs-on: ubuntu-24.04
concurrency:
group: cos-${{ github.repository }}-${{ github.event_name == 'pull_request' && 'pr' || 'production' }}
group: cos-${{ github.repository }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || 'production' }}
cancel-in-progress: false
queue: max
steps:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ The browser app uses typed Reel state, one Enum per dispatch, and validates
legacy Map/new Store data when hydrating the original `map.clj.im` storage key.

`VITE_BASE_URL` controls asset URLs (default `./`). CI builds against
`https://cos-sh.tiye.me/clojure-china/map.clojure-china.org/`, with `/pr/` for
previews. COS uploads only `dist/`; cos-upload-action v1.2.0 verifies public
`https://cos-sh.tiye.me/clojure-china/map.clojure-china.org/`, with
`/pr/<number>/<run>/<attempt>/` for isolated previews. Upload queues are separate
per PR; the production path is unchanged. COS uploads only `dist/`; cos-upload-action v1.2.0 verifies public
uploads internally. Configure `COS_BUCKET`, `COS_SECRET_ID`, `COS_SECRET_KEY`
in repository secrets. PRs without secrets run checks/build but skip upload
verification; they do not demonstrate successful remote deployment.
Expand Down