This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Sync API docs #184
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.3.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.4.1 | |
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' |