build: add auto-publish to gh-pages workflow
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
This commit is contained in:
parent
3bd0d4368b
commit
100c65680d
2 changed files with 45 additions and 0 deletions
8
.github/workflows/pipeline.yml
vendored
8
.github/workflows/pipeline.yml
vendored
|
|
@ -32,6 +32,14 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- extract-branch
|
- extract-branch
|
||||||
uses: maptiler/tileserver-gl/.github/workflows/ct.yml@master
|
uses: maptiler/tileserver-gl/.github/workflows/ct.yml@master
|
||||||
|
publish-openapi-specs:
|
||||||
|
name: 'Publish OpenAPI specs'
|
||||||
|
needs:
|
||||||
|
- extract-branch
|
||||||
|
- ci
|
||||||
|
- ct
|
||||||
|
if: github.event_name == 'push' && needs.extract-branch.outputs.current_branch == 'master'
|
||||||
|
uses: maptiler/tileserver-gl/.github/workflows/publish-specs.yml@master
|
||||||
automerger:
|
automerger:
|
||||||
name: 'Automerge Dependabot PRs'
|
name: 'Automerge Dependabot PRs'
|
||||||
needs:
|
needs:
|
||||||
|
|
|
||||||
37
.github/workflows/publish-specs.yml
vendored
Normal file
37
.github/workflows/publish-specs.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Deploy Specs to Pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Check out repository ✨ (non-dependabot)
|
||||||
|
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Check out repository 🎉 (dependabot)
|
||||||
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Setup node env 📦
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version-file: 'package.json'
|
||||||
|
check-latest: true
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Generate Swagger UI
|
||||||
|
uses: Legion2/swagger-ui-action@v1.1.6
|
||||||
|
with:
|
||||||
|
output: dist
|
||||||
|
spec-file: specs/openapi.yaml
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3.9.1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: dist
|
||||||
Loading…
Reference in a new issue