diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-09-01 14:48:45 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-09-01 14:48:45 +0300 |
| commit | 8a6d697308162874a236c84aac0b0f8c7ac01f83 (patch) | |
| tree | ed7dc7e8c6f50d66bde721fae78576aede929f66 /.github/workflows/preview.yml | |
| parent | b54a78aa510b87d1e3b56c619b72eaeb59e4a2a1 (diff) | |
refactor: separate website presentation from runtime
Diffstat (limited to '.github/workflows/preview.yml')
| -rw-r--r-- | .github/workflows/preview.yml | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index f2314dcf..cd880016 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -57,8 +57,8 @@ jobs: else commit="$(python3 scripts/preview.py select-commit --ref origin/master)" fi - current_preview="$(python3 scripts/preview.py current-commit --manifest website/preview.json || true)" - if [ "$current_preview" = "$commit" ] && node website/scripts/docs-preview.mjs check; then + current_preview="$(python3 scripts/preview.py current-commit --manifest distribution/preview.json || true)" + if [ "$current_preview" = "$commit" ] && node scripts/docs/preview.mjs check; then echo "Preview and documentation already point at $commit; skipping." echo "should_publish=false" >> "$GITHUB_OUTPUT" exit 0 @@ -305,17 +305,12 @@ jobs: with: path: artifacts - - name: Install Bun - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 - with: - bun-version: 1.3.14 - - name: Record previous preview commit id: previous-preview shell: bash run: | set -euo pipefail - previous="$(python3 scripts/preview.py current-commit --manifest website/preview.json || true)" + previous="$(python3 scripts/preview.py current-commit --manifest distribution/preview.json || true)" if [ -z "$previous" ]; then previous="$(git describe --tags --match 'v[0-9]*' --abbrev=0)" fi @@ -418,9 +413,9 @@ jobs: - name: Update preview documentation and manifest run: | - node website/scripts/docs-preview.mjs snapshot '${{ needs.preflight.outputs.commit }}' + node scripts/docs/preview.mjs snapshot '${{ needs.preflight.outputs.commit }}' python3 scripts/preview.py manifest \ - --output website/preview.json \ + --output distribution/preview.json \ --tag '${{ needs.preflight.outputs.tag }}' \ --build-id '${{ needs.preflight.outputs.build_id }}' \ --commit '${{ needs.preflight.outputs.commit }}' \ @@ -430,7 +425,6 @@ jobs: --notes PREVIEW_NOTES.md \ --sha-file preview-sha256.json \ --retain 30 - (cd website && bun install --frozen-lockfile) - name: Commit preview publication env: @@ -438,14 +432,13 @@ jobs: run: | git config user.name "kangal-bot" git config user.email "285672167+kangal-bot@users.noreply.github.com" - git add -A docs/preview website/preview.json + git add -A docs/preview distribution/preview.json git diff --cached --quiet || git commit -m "docs: publish preview documentation" remote="https://x-access-token:${KANGAL_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" for attempt in 1 2 3; do git pull --rebase "$remote" master - node website/scripts/docs-preview.mjs check - node website/scripts/docs-versions.mjs check - (cd website && bun run build) + node scripts/docs/preview.mjs check + node scripts/docs/versions.mjs check if git push "$remote" HEAD:master; then exit 0 fi @@ -457,17 +450,6 @@ jobs: echo "failed to publish preview documentation after 3 attempts" >&2 exit 1 - - name: Trigger website deploy - env: - DEPLOY_HOOK: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_HOOK }} - run: | - if [ -z "$DEPLOY_HOOK" ]; then - echo "CLOUDFLARE_PAGES_DEPLOY_HOOK not set; relying on Cloudflare git auto-deploy" - exit 0 - fi - curl -fsS -X POST "$DEPLOY_HOOK" > /dev/null - echo "Triggered Cloudflare Pages production deploy" - - name: Mark preview-released issues continue-on-error: true shell: bash |
