From 51672bcec23070cb2838574bdf5f97ca611e99a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=97=E8=9B=8B=E6=97=A5?= <1228342698@qq.com> Date: Fri, 20 Jan 2023 20:24:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8A=E4=BC=A0=E7=9A=84=20index.json?= =?UTF-8?q?=20=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改用 rxrw/algolia-index-uploader@v1,将上传 index.json 至 Algolia 的步骤移至 build 这一 job 内。 --- .github/workflows/pages.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 8509c59c..d8369f84 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -56,7 +56,14 @@ jobs: uses: actions/upload-pages-artifact@v1 with: path: ./public - + - name: Upload "index.json" to Algolia + uses: rxrw/algolia-index-uploader@v1 + with: + index_path: "./public/index.json" + algolia_index_name: "shuosc_index_with_prefix" + algolia_index_admin_key: ${{ secrets.ALGOLIA_APIKEY }} + algolia_index_id: "WDJUT0BGDL" + # Deployment job deploy: environment: @@ -67,17 +74,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 - - # Upload "index.json" to Algolia - generate-algolia: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: caibingcheng/hugo-algolia2@v1 - with: - input: "./posts/**" - output: "./algolia.json" - index: "shuosc_index_with_prefix" - apikey: ${{ secrets.ALGOLIA_APIKEY }} - appid: "WDJUT0BGDL" + uses: actions/deploy-pages@v1 \ No newline at end of file