mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 17:18:40 +08:00
Update aloglia.yml
This commit is contained in:
parent
0cd2dd7dd3
commit
338e040f89
84
.github/workflows/aloglia.yml
vendored
84
.github/workflows/aloglia.yml
vendored
@ -1,46 +1,46 @@
|
|||||||
name: Netlify -> Algolia Crawler
|
# name: Netlify -> Algolia Crawler
|
||||||
on:
|
# on:
|
||||||
push:
|
# push:
|
||||||
branches: [ master ]
|
# branches: [ master ]
|
||||||
pull_request:
|
# pull_request:
|
||||||
types: ['opened', 'edited', 'reopened', 'synchronize']
|
# types: ['opened', 'edited', 'reopened', 'synchronize']
|
||||||
|
|
||||||
jobs:
|
# jobs:
|
||||||
algolia_recrawl:
|
# algolia_recrawl:
|
||||||
name: Algolia Recrawl
|
# name: Algolia Recrawl
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
# checkout this repo
|
# # checkout this repo
|
||||||
- name: Checkout Repo
|
# - name: Checkout Repo
|
||||||
uses: actions/checkout@v2
|
# uses: actions/checkout@v2
|
||||||
|
|
||||||
# We don't know when the site will be deployed, we just wait a few seconds
|
# # We don't know when the site will be deployed, we just wait a few seconds
|
||||||
# Better solutions can be found
|
# # Better solutions can be found
|
||||||
- name: Sleep for 30s
|
# - name: Sleep for 30s
|
||||||
run: sleep 30
|
# run: sleep 30
|
||||||
|
|
||||||
# For PRs
|
# # For PRs
|
||||||
- name: Netlify-PR => Algolia crawler creation and recrawl on preview (Pull Request)
|
# - name: Netlify-PR => Algolia crawler creation and recrawl on preview (Pull Request)
|
||||||
if: github.ref != 'refs/heads/master'
|
# if: github.ref != 'refs/heads/master'
|
||||||
uses: algolia/algoliasearch-crawler-github-actions@v1
|
# uses: algolia/algoliasearch-crawler-github-actions@v1
|
||||||
id: crawler_pr
|
# id: crawler_pr
|
||||||
with:
|
# with:
|
||||||
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
|
# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
|
||||||
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
|
# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
|
||||||
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
|
# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
|
||||||
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
|
# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
|
||||||
site-url: 'https://deploy-preview-${{ github.event.pull_request.number }}--wot-design-uni.netlify.app/'
|
# site-url: 'https://deploy-preview-${{ github.event.pull_request.number }}--wot-design-uni.netlify.app/'
|
||||||
override-config: true
|
# override-config: true
|
||||||
|
|
||||||
# For main branch
|
# # For main branch
|
||||||
- name: Netlify-MAIN => Algolia crawler creation and recrawl (Push on Main branch)
|
# - name: Netlify-MAIN => Algolia crawler creation and recrawl (Push on Main branch)
|
||||||
if: github.ref == 'refs/heads/master'
|
# if: github.ref == 'refs/heads/master'
|
||||||
uses: algolia/algoliasearch-crawler-github-actions@v1
|
# uses: algolia/algoliasearch-crawler-github-actions@v1
|
||||||
id: crawler_push
|
# id: crawler_push
|
||||||
with:
|
# with:
|
||||||
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
|
# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
|
||||||
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
|
# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
|
||||||
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
|
# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
|
||||||
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
|
# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
|
||||||
site-url: 'https://wot-design-uni.netlify.app/'
|
# site-url: 'https://wot-design-uni.netlify.app/'
|
||||||
override-config: true
|
# override-config: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user