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'