Fix the link and order of the Getting Started Guides (#698) #89
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 mdbook | |
build-mdbook: | |
runs-on: ubuntu-latest | |
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 | |
# Upload the mdBook output to GitHub Pages | |
- name: Upload mdbook to GitHub Pages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mdbook | |
path: ./docs/book | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
service: | |
- account | |
- content-watcher | |
- content-publishing | |
- graph | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# 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: Upload OpenAPI UI artifact for ${{ matrix.service }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: openapi-${{ matrix.service }} | |
path: ./docs/${{ matrix.service }} | |
# Deployment job | |
deploy: | |
name: Deploy mdbook and OpenAPI microservices to GitHub Pages | |
runs-on: ubuntu-latest | |
needs: [build, build-mdbook] | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Download mdbook artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: mdbook | |
path: ./docs | |
- name: Download account OpenAPI artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: openapi-account | |
path: ./docs/account | |
- name: Download content-watcher OpenAPI artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: openapi-content-watcher | |
path: ./docs/content-watcher | |
- name: Download content-publishing OpenAPI artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: openapi-content-publishing | |
path: ./docs/content-publishing | |
- name: Download graph OpenAPI artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: openapi-graph | |
path: ./docs/graph | |
- name: Upload final result to GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |