-
Notifications
You must be signed in to change notification settings - Fork 71
35 lines (33 loc) · 1.21 KB
/
onPushToDocs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# test
name: build-docs
on:
push:
branches: [docs]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: salesforcecli/github-workflows/.github/actions/getGithubUserInfo@main
id: github-user-info
with:
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
- uses: salesforcecli/github-workflows/.github/actions/gitConfig@main
with:
username: ${{ steps.github-user-info.outputs.username }}
email: ${{ steps.github-user-info.outputs.email }}
- name: doc build
env:
GIT_USER: svc-cli-bot
GIT_PASS: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
working-directory: website
run: |
yarn install
echo "machine github.com login svc-cli-bot password ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}" > ~/.netrc
yarn deploy
- name: trigger algolia reindex
run: |
curl -H "Content-Type: application/json" -X POST --user ${{ secrets.CRAWLER_USER_ID }}:${{ secrets.CRAWLER_API_KEY }} "https://crawler.algolia.com/api/1/crawlers/${{ secrets.CRAWLER_ID }}/reindex"