Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build & Publish Docs

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install nxlib and dev dependencies
run: uv sync --dev

- name: Build documentation
run: uv run python scripts/generate_docs.py doc_build

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: doc_build

deploy:
needs: build-docs
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies = [

[project.urls]
Homepage = "https://github.com/cfs-energy/nxlib"
# TODO (SW-14420): Add URL for documentation
Documentation = "https://cfs-energy.github.io/nxlib/"
Repository = "https://github.com/cfs-energy/nxlib"
Issues = "https://github.com/cfs-energy/nxlib/issues"
Changelog = "https://github.com/cfs-energy/nxlib/blob/main/CHANGELOG.md"
Expand Down