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