Deploy to GitHub Pages #13
Workflow file for this run
This file contains hidden or 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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- docs/** | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
service: | |
- account | |
# - content-watcher | |
# - content-publishing | |
# - graph | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Set up mdBook 📚 | |
# uses: ./.github/workflows/common/set-up-mdbook | |
# with: | |
# token: ${{secrets.GITHUB_TOKEN}} | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
# - name: Build with mdBook | |
# working-directory: docs | |
# run: mdbook build && ls book | |
# - name: Upload artifact | |
# uses: actions/upload-pages-artifact@v3 | |
# with: | |
# path: ./docs/book | |
# Publish OpenAPI specs for each microservice | |
- name: Build and Publish OpenAPI spec for ${{ matrix.service }} | |
uses: ./.github/workflows/common/openapi-build | |
with: | |
service: ${{ matrix.service }} | |
- name: Publish OpenAPI UI to GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/${{ matrix.service }} | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |