Skip to content

Commit

Permalink
docs: publish HTML documentation to Github Pages
Browse files Browse the repository at this point in the history
Signed-off-by: VirtualTam <[email protected]>
  • Loading branch information
virtualtam committed Nov 24, 2024
1 parent c125b08 commit e442607
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 14 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ jobs:
- name: Build
run: make build

docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: jontze/action-mdbook@v3
with:
mdbook-version: "~0.4.36"
token: ${{secrets.GITHUB_TOKEN}}

- name: Generate documentation
run: make docs

lint:
runs-on: ubuntu-latest
steps:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Docs

on:
push:
branches:
- main
tags:
- v*
pull_request: {}

docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: jontze/action-mdbook@v3
with:
mdbook-version: "~0.4.36"
token: ${{secrets.GITHUB_TOKEN}}

- name: Generate documentation
run: make docs

- name: Upload documentation as an artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: './docs/book'

gh-pages:
if: github.ref == 'refs/heads/main'
needs: docs

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

1 change: 1 addition & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ project adheres to [Semantic Versioning](https://semver.org/).
### Changed
### CI
- Lint and format SQL files with SQLFluff
- Publish HTML documentation to Github Pages

#### www
- Update the home page
Expand Down

0 comments on commit e442607

Please sign in to comment.