Skip to content

Commit 2a14ee6

Browse files
authored
⚙️ add DocSearch crawl action to prod workflow (#234)
2 parents 85c93fc + a79842f commit 2a14ee6

File tree

2 files changed

+22
-27
lines changed

2 files changed

+22
-27
lines changed

.github/workflows/deploy-production.yaml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -78,32 +78,27 @@ jobs:
7878
vercel-args: "--prod --local-config ../vercel.json" #Optional
7979
working-directory: public
8080

81-
# docsearch-scrape:
81+
docsearch-crawl:
8282

83-
# # The type of runner that the job will run on
84-
# runs-on: ubuntu-20.04
85-
# needs: [deploy-production]
86-
# # Run job only if there are changes to 'content/docs/**' or 'docsearch-prod.json'
87-
# if: |
88-
# needs.deploy-production.outputs.docs == 'true' ||
89-
# needs.deploy-production.outputs.docsearch_config == 'true'
83+
# The type of runner that the job will run on
84+
runs-on: ubuntu-20.04
85+
needs: [deploy-production]
86+
# Run job only if there are changes to 'content/docs/**'
87+
if: |
88+
needs.deploy-production.outputs.docs == 'true'
9089
91-
# steps:
92-
# # Step 1 - Checks-out your repository under $GITHUB_WORKSPACE
93-
# - name: Checkout
94-
# uses: actions/checkout@v3
90+
steps:
91+
# Step 1 - Checks-out your repository under $GITHUB_WORKSPACE
92+
- name: Checkout
93+
uses: actions/checkout@v3
9594

96-
# # Step 2 - Format and output DocSearch config
97-
# - name: Output formatted docsearch-*.json as config
98-
# id: docsearch-config
99-
# # run: echo "::set-output name=config::$(cat docsearch-preview.json | jq -r tostring)"
100-
# run: echo "config=$(cat docsearch-prod.json | jq -r tostring)" >> $GITHUB_OUTPUT
101-
102-
# # Step 3 - Update DocSearch Index only if content files were changed
103-
# - name: Algolia DocSearch Crawl & Index
104-
# id: docsearch-scrape
105-
# uses: adapttive/algolia-docsearch-action@1.1.1
106-
# env:
107-
# APPLICATION_ID: ${{ secrets.DOCSEARCH_APP_ID_PROD }}
108-
# API_KEY: ${{ secrets.DOCSEARCH_WRITE_API_KEY_PROD }}
109-
# CONFIG: ${{ steps.docsearch-config.outputs.config }}
95+
# Step 2 - Perform DocSearch crawl only if content files were changed
96+
- name: Algolia crawl on content update
97+
uses: algolia/algoliasearch-crawler-github-actions@v1.1.13
98+
id: docsearch-crawl
99+
with:
100+
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
101+
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
102+
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
103+
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
104+
site-url: 'https://lotusdocs.dev/'

content/docs/features/google-analytics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ images: []
1313

1414
Lotus Docs utilises Hugo's internal [Google Analytics v4](https://support.google.com/analytics/#topic=9143232) template[^1].
1515

16-
{{< alert context="info" text="Starting **July 1, 2023**, Universal Analytics (UA) was **deprecated** and is [no longer processed](https://support.google.com/analytics/answer/11583528) by Google. Lotus Docs does not include support for UA." />}}
16+
{{< alert context="info" text="As of **July 1, 2023**, UA (Universal Analytics) was **deprecated**, and is [no longer processed](https://support.google.com/analytics/answer/11583528) by Google. Lotus Docs does **not** support UA." />}}
1717

1818
## Enabling Google Analytics
1919

0 commit comments

Comments
 (0)