-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (41 loc) · 1.32 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
name: Build & deploy adaptor documentation
on:
push:
branches: [main]
jobs:
build:
name: 'Build docs to docs branch'
runs-on: ubuntu-latest
permissions: write-all
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.13.2
- 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: Build docs to docs branch
run: pnpm exec .github/workflows/docs.sh
# 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"}'