From 1c612749808b36c3ddee9baf38fd929c6a12ab01 Mon Sep 17 00:00:00 2001 From: "Eric X. Liu" Date: Sat, 20 Dec 2025 01:55:47 +0000 Subject: [PATCH] Update .gitea/workflows/publish.yaml --- .gitea/workflows/publish.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index 53c53cb..99a3895 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -37,13 +37,18 @@ jobs: COMMIT_URL="https://git.ericxliu.me/eric/ericxliu-me/commit/$SHORT_COMMIT" find ./public -type f -exec sed -i "s|\[commit\]|\[$SHORT_COMMIT\]|g" {} + - - name: Deploy + - name: Publish uses: peaceiris/actions-gh-pages@v4 with: personal_token: ${{ secrets.GIT_PAGES_TOKEN }} publish_dir: ./public publish_branch: gitea-pages - - name: Reload Kubernetes pods + - name: Deploy run: | - curl -X DELETE https://10.10.0.10:6443/api/v1/namespaces/hugo/pods/ --header "Authorization: Bearer ${{ secrets.HUGO_K8S_TOKEN }}" --insecure \ No newline at end of file + K8S_TOKEN="${{secrets.K8S_TOKEN}}" + echo "K8S_TOKEN length: $(echo "$K8S_TOKEN" | wc -c)" + echo "K8S_TOKEN starts with: $(echo "$K8S_TOKEN" | head -c 20)..." + curl -X DELETE "https://10.10.0.10:6443/api/v1/namespaces/hugo/pods?labelSelector=app.kubernetes.io/name=hugo" \ + --header "Authorization: Bearer $K8S_TOKEN" \ + --insecure --fail-with-body --show-error --verbose