From 3c5e8ae5219e2e29506391f1967ff22f5dbbeb83 Mon Sep 17 00:00:00 2001 From: andreasfoo Date: Tue, 16 Dec 2025 21:02:01 +0800 Subject: [PATCH 1/9] minor: add env for action. --- .github/workflows/deploy.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 024dbde..50c7763 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,9 +1,9 @@ -name: Build and Deploy +name: Deploy GitHub Pages on: push: branches: - - tingly-box-pages + - main permissions: contents: read @@ -11,9 +11,12 @@ permissions: id-token: write jobs: - build: + deploy: runs-on: ubuntu-latest + environment: + name: github-pages + steps: - name: Checkout uses: actions/checkout@v4 @@ -30,6 +33,12 @@ jobs: - name: Build run: npm run build + - name: Verify build output + run: | + echo "==== dist contents ====" + ls -la dist + test -f dist/index.html + - name: Setup Pages uses: actions/configure-pages@v5 From 30efccc1cd2f01b2acecc5c279fb2246210a57dc Mon Sep 17 00:00:00 2001 From: andreasfoo Date: Tue, 16 Dec 2025 21:15:21 +0800 Subject: [PATCH 2/9] minor: add debug deploy step --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 50c7763..1d5e42b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,6 +42,11 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v5 + - name: Debug dist contents + run: | + echo "==== dist tree ====" + find dist -maxdepth 3 -type f + - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 with: From 65c8645174467d3ab55944c734803ec58cb53b91 Mon Sep 17 00:00:00 2001 From: andreasfoo Date: Tue, 16 Dec 2025 21:17:24 +0800 Subject: [PATCH 3/9] Trigger deployment workflow From e22b5f0618fcaa5b11debd2462e58543a01a40b0 Mon Sep 17 00:00:00 2001 From: andreasfoo Date: Tue, 16 Dec 2025 21:24:00 +0800 Subject: [PATCH 4/9] Trigger deployment after Pages configuration change From 90552c206979d42cb01d24650145bc739ea5cb55 Mon Sep 17 00:00:00 2001 From: FFengIll Date: Tue, 16 Dec 2025 21:24:22 +0800 Subject: [PATCH 5/9] bugfix: github pages release url error. --- index.html | 2 +- vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 102470d..6997d87 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ - + diff --git a/vite.config.ts b/vite.config.ts index e3bf4e3..bc92d1e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,5 +15,5 @@ export default defineConfig(({ mode }) => ({ "@": path.resolve(__dirname, "./src"), }, }, - base: mode === "production" ? "/tingly-box/" : "/", + base: mode === "production" ? "/" : "/", })); From bdd4411df5a5402528f7d6006f19f7628d880bf6 Mon Sep 17 00:00:00 2001 From: FFengIll Date: Tue, 16 Dec 2025 21:30:22 +0800 Subject: [PATCH 6/9] ci: add for static deploy. --- .github/workflows/static.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..8d9c08a --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,57 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Build + run: | + npm run build + cp -R ./dist/* ./ + + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload dist + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file From d2b4c3f575541e4bb7d7f15017a87dcf07c565e6 Mon Sep 17 00:00:00 2001 From: FFengIll Date: Tue, 16 Dec 2025 21:31:33 +0800 Subject: [PATCH 7/9] ci: update condition. --- .github/workflows/static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 8d9c08a..774b32c 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -4,7 +4,7 @@ name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: ["tingly-box-pages", "main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 65b1368f5e201127b1a4d1f317a1ca682f43a3bb Mon Sep 17 00:00:00 2001 From: FFengIll Date: Tue, 16 Dec 2025 21:33:02 +0800 Subject: [PATCH 8/9] ci: update upload path. --- .github/workflows/static.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 774b32c..0cb1bbb 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -43,7 +43,6 @@ jobs: - name: Build run: | npm run build - cp -R ./dist/* ./ - name: Setup Pages uses: actions/configure-pages@v5 @@ -51,7 +50,7 @@ jobs: uses: actions/upload-pages-artifact@v3 with: # Upload dist - path: '.' + path: './dist' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 \ No newline at end of file From 81b4f45dc05ea71c21dc93cf7265469b5102bc46 Mon Sep 17 00:00:00 2001 From: FFengIll Date: Tue, 16 Dec 2025 21:44:50 +0800 Subject: [PATCH 9/9] ci: clean up. --- .github/workflows/deploy.yml | 56 ------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 1d5e42b..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Deploy GitHub Pages - -on: - push: - branches: - - main - -permissions: - contents: read - pages: write - id-token: write - -jobs: - deploy: - runs-on: ubuntu-latest - - environment: - name: github-pages - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18 - cache: npm - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Verify build output - run: | - echo "==== dist contents ====" - ls -la dist - test -f dist/index.html - - - name: Setup Pages - uses: actions/configure-pages@v5 - - - name: Debug dist contents - run: | - echo "==== dist tree ====" - find dist -maxdepth 3 -type f - - - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v3 - with: - path: dist - - - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v4