-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (49 loc) · 1.54 KB
/
docs.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build & deploy adaptor documentation
on:
workflow_run:
workflows: [Publish]
types:
- completed
push:
branches: [main]
jobs:
build:
name: 'Build docs to docs branch'
runs-on: ubuntu-latest
permissions: write-all
strategy:
matrix:
node-version: [18.17.1]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- name: Setup node ${{ matrix.node-version }}
# https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: config commit username
run: git config user.name $GH_USER
env:
GH_USER: ${{ secrets.GH_USER }}
- name: config commit email
run: git config user.email $GH_EMAIL
env:
GH_EMAIL: ${{ secrets.GH_EMAIL }}
- name: Installing packages
run: pnpm install --frozen-lockfile
- name: Build docs
run: pnpm build:adaptors docs
- name: Generate docs.json
run: pnpm docs:build
- name: Commit docs.json to docs branch
run: pnpm docs:publish
# Trigger a rebuild on the docs site to pull adaptor docs
- name: Trigger deploy on openFn/docs
run: |
sleep 10s && curl -X POST \
-H "Authorization: Bearer ${{ secrets.WF_DEPLOY_KEY }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/openFn/docs/actions/workflows/5178103/dispatches \
-d '{"ref": "main"}'