1111 - ' .github/workflows/deploy_docs.yaml'
1212 branches :
1313 - init/chr/tdasset-docs
14+ - main
1415
1516jobs :
1617 deploy :
@@ -46,46 +47,49 @@ jobs:
4647 python3 .github/scripts/generate_version.py $(git tag | egrep "v(.*)$" | xargs echo -n) > test_versions.json
4748 cat test_versions.json
4849
49- # - name: build docs
50- # run: |
51- # pnpm install
52- # pnpm run build
50+ - name : build docs
51+ run : |
52+ pnpm install
53+ pnpm run build
5354
54- # - name: Azure Login
55- # uses: azure/login@v2
56- # with:
57- # creds: ${{ secrets.AZURE_CREDENTIALS }}
55+ - name : Azure Login
56+ uses : azure/login@v2
57+ with :
58+ creds : ${{ secrets.AZURE_CREDENTIALS }}
5859
59- # - name: upload docs to Azure Blob Storage
60- # uses: azure/cli@v2
61- # with:
62- # azcliversion: 2.73.0
63- # inlineScript: |
64- # az storage blob upload-batch \
65- # --account-name ${{ secrets.AZURE_STORAGE_ACCOUNT }} \
66- # --destination '$web' \
67- # --source build \
68- # --overwrite \
69- # --auth-mode key
70- # echo "Uploaded EN docs to Azure Blob Storage"
60+ - name : upload docs to Azure Blob Storage
61+ uses : azure/cli@v2
62+ with :
63+ azcliversion : 2.73.0
64+ inlineScript : |
65+ az storage blob upload-batch \
66+ --account-name ${{ secrets.AZURE_STORAGE_ACCOUNT }} \
67+ --destination '$web' \
68+ --source build \
69+ --overwrite \
70+ --auth-mode key
71+ echo "Uploaded EN docs to Azure Blob Storage"
7172
72- # - name: purge Azure CDN endpoint
73- # uses: azure/cli@v2
74- # with:
75- # azcliversion: 2.73.0
76- # inlineScript: |
77- # az cdn endpoint purge \
78- # --resource-group ${{ secrets.AZURE_RESOURCE_GROUP }} \
79- # --profile-name ${{ secrets.AZURE_CDN_PROFILE }} \
80- # --name ${{ secrets.AZURE_CDN_ENDPOINT }} \
81- # --content-paths "/*" "/index.html" "/"
82- # echo "Azure CDN purged for docs.tdasset.ai"
73+ - name : purge Azure CDN endpoint
74+ uses : azure/cli@v2
75+ with :
76+ azcliversion : 2.73.0
77+ inlineScript : |
78+ az cdn endpoint purge \
79+ --resource-group ${{ secrets.AZURE_RESOURCE_GROUP }} \
80+ --profile-name ${{ secrets.AZURE_CDN_PROFILE }} \
81+ --name ${{ secrets.AZURE_CDN_ENDPOINT }} \
82+ --content-paths "/*" "/index.html" "/"
83+ echo "Azure CDN purged for docs.tdasset.ai"
8384
84- - name : update search index
85- uses : Swilder-M/docsearch-scraper-simple@next
85+ - name : Run docsearch-scraper
8686 env :
8787 APPLICATION_ID : ${{ secrets.ALGOLIA_APPLICATION_ID }}
8888 API_KEY : ${{ secrets.ALGOLIA_API_KEY }}
89- with :
90- docs_type : ${{ env.DOCS_TYPE }}
91- docs_version : ${{ env.VERSION }}
89+ run : |
90+ CONFIG="$(cat ${{ github.workspace }}/.docsearch/tdasset.json | jq -r tostring)" \
91+ docker run --rm \
92+ -e APPLICATION_ID \
93+ -e API_KEY \
94+ -e CONFIG="$CONFIG" \
95+ algolia/docsearch-scraper
0 commit comments