Skip to content

Disable search indexing in deploy process (#92) #85

Disable search indexing in deploy process (#92)

Disable search indexing in deploy process (#92) #85

Workflow file for this run

name: 🚚 Deploy
on:
push:
branches: [master]
env:
NODE_OPTIONS: '--max_old_space_size=8192'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Build
working-directory: ./blog
run: NODE_ENV=production pnpm run build
# - name: Prepare tag
# id: prepare_tag
# if: startsWith(github.ref, 'refs/tags/')
# run: |
# TAG_NAME="${GITHUB_REF##refs/tags/}"
# echo "::set-output name=tag_name::${TAG_NAME}"
# echo "::set-output name=deploy_tag_name::deploy-${TAG_NAME}"
# - name: Cloudflare Pages Upload
# uses: cloudflare/pages-action@v1
# with:
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# projectName: ens-blog
# branch: master
# directory: blog/out
# # gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# wranglerVersion: '3'
# - name: Edgeserver Upload
# uses: lvkdotsh/[email protected]
# with:
# app_id: "207907816382402560"
# server: https://api.edgeserver.io
# token: ${{ secrets.SIGNAL_TOKEN }} # ${{ secrets.EDGESERVER_TOKEN }}
# directory: blog/out
- name: Read search.json
id: read_search_json
run: |
SEARCH_JSON=$(cat blog/out/search.json)
echo "::set-output name=search_json::${SEARCH_JSON}"
# - name: Deploy search index
# uses: fjogeleit/http-request-action@v1
# with:
# url: 'https://search.v3x.systems/indexes/ens-blog/documents?primaryKey=slug'
# method: 'POST'
# bearerToken: ${{ secrets.SEARCH_TOKEN }}
# data: ${{ steps.read_search_json.outputs.search_json }}