respec #17
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: respec | |
# author: @MikeRalphson | |
# issue: https://github.com/OAI/OpenAPI-Specification/issues/1564 | |
# | |
# This workflow updates the respec 'pretty' rendered versions of the spec | |
# on the gh-pages branch when the corresponding markdown files change. | |
# | |
# run this on push to main | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
respec: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 # checkout main branch | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 # setup Node.js | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: npm ci | |
- uses: actions/checkout@v4 # checkout gh-pages branch | |
with: | |
token: ${{ secrets.OAS_REPO_TOKEN }} | |
repository: OAI/OpenAPI-Specification # TODO: change to OAI/... | |
ref: gh-pages | |
path: deploy | |
- name: run main script | |
run: scripts/md2html/build.sh | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
# A personal access token is required to push changes to the repository. | |
# This token needs to be refreshed regularly and stored in the repository secrets. | |
token: ${{ secrets.OAS_REPO_TOKEN }} | |
branch: update-overlay-respec-version | |
base: gh-pages | |
delete-branch: true | |
path: deploy | |
labels: Housekeeping | |
team-reviewers: OAI/tsc | |
title: Update ReSpec-rendered specification versions for Overlay | |
commit-message: Update ReSpec-rendered specification versions | |
signoff: true | |
body: | | |
This pull request is automatically triggered by GitHub action `respec` in the OAI/Overlay-Specification repo. | |
The `versions/*.md` files have changed, so the HTML files are automatically being regenerated. |