forked from nodejs/nodejs.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.03 KB
/
sync-api.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
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Sync API docs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
sync-api-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Git Checkout
uses: actions/checkout@v3.1.0
with:
ref: main
token: ${{ secrets.ACCESS_TOKEN_ACTIONS }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install NPM packages
run: npm ci
- name: 'Sync API specifications'
shell: bash
run: |
npm run sync-api
- name: Lint Markdown files
run: npm run lint:md
- uses: jongwooo/gatsby-cache@v1.1.0
with:
key: sync-api-gatsby-ubuntu-latest
- name: Build Gatsby
run: npm run build-ci
- name: Commit API changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore(api): sync auto-generated docs'
branch: 'main'