File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,22 @@ jobs:
19
19
needs : activate
20
20
runs-on : ubuntu-latest
21
21
container : algolia/docsearch-scraper:v1.12.0
22
+ env :
23
+ CONFIG : ${{ github.workspace }}/docsearch/config.json
24
+ REMOTE_CONFIG : https://docs.asciidoctor.org/docsearch-config.json
25
+ WORKSPACE : ${{ github.workspace }}
22
26
steps :
23
27
- name : Checkout
24
28
run : |
25
29
wget https://github.com/${{ github.repository }}/archive/refs/heads/main.tar.gz
26
- mkdir -p ${{ github.workspace }}
27
- tar -C ${{ github.workspace }} --strip-components=1 -zxf $PWD/main.tar.gz
28
- echo ${{ github.workspace }}
29
- ls ${{ github.workspace }}
30
+ mkdir -p $WORKSPACE
31
+ tar -C $WORKSPACE --strip-components=1 -zxf $PWD/main.tar.gz
30
32
- name : Index
31
33
env :
32
34
APPLICATION_ID : ${{ secrets.ALGOLIA_APP_ID }}
33
35
API_KEY : ${{ secrets.ALGOLIA_API_KEY }}
34
- CONFIG : ${{ github.workspace }}/docsearch/config.json
35
36
run : |
36
- curl -L -o $CONFIG https://docs.asciidoctor.org/docsearch-config.json
37
+ curl -L -o $CONFIG $REMOTE_CONFIG
37
38
INDEX_NAME=$(node -p "JSON.parse(require('fs').readFileSync('$CONFIG')).index_name")
38
39
SITEMAP_URL=$(node -p "JSON.parse(require('fs').readFileSync('$CONFIG')).sitemap_urls[0].replace('.xml', '-ROOT.xml')")
39
40
# only run indexer if index is more than 2 days out of date
You can’t perform that action at this time.
0 commit comments