diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fbb9d91..ddb0afb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,9 +1,6 @@ name: Lint on: - push: - branches: - - main pull_request: branches: - main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a36923b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Publish Docs + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + + - name: Bundle OAS into single file + run: npx @redocly/cli@latest bundle spec.json --ext=json -o build/bundled + + - name: Build Redocly HTML + run: npx @redocly/cli@latest build-docs build/bundled.json -o build/docs.html + + - name: Deploy to GH Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + BRANCH: gh-pages + CLEAN: true + FOLDER: build