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
79 changes: 79 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Docs

on:
push:
branches: [master]
pull_request:
release:
types: [published]
workflow_dispatch:

env:
QUARTO_VERSION: "1.10.18"
# Directory on the gh-pages branch that this build belongs to. Releases are
# deployed under their tag, everything else is the development version.
ESPEI_DOCS_VERSION: ${{ github.event_name == 'release' && github.event.release.tag_name || 'dev' }}

jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # fetch the entire repo history, required to guarantee setuptools_scm will pick up the tags
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: ${{ env.QUARTO_VERSION }}
- run: uv sync --dev
- name: Build API reference
run: uv run quartodoc build
working-directory: docs
- name: Render site
run: uv run quarto render
working-directory: docs
- uses: actions/upload-artifact@v7
with:
name: docs-site
path: docs/_site

deploy:
name: Deploy to gh-pages
needs: build
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
# Serialize pushes to the gh-pages branch
concurrency:
group: gh-pages
cancel-in-progress: false
steps:
- uses: actions/checkout@v7
with:
path: source
- uses: actions/checkout@v7
with:
ref: gh-pages
path: gh-pages
- uses: actions/download-artifact@v8
with:
name: docs-site
path: site
- run: python3 source/docs/_scripts/deploy_version.py --site site --pages gh-pages --version "$ESPEI_DOCS_VERSION"
- name: Commit and push
working-directory: gh-pages
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --cached --quiet; then
echo "No changes to deploy"
else
git commit -m "Deploy docs for $ESPEI_DOCS_VERSION from ${{ github.sha }}"
git push
fi
16 changes: 0 additions & 16 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@ name: ESPEI tests
on: [push, pull_request]

jobs:
# sphinx-build: Check that the documentation builds html with no warnings
sphinx-build:
name: Run sphinx-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # fetch the entire repo history, required to guarantee versioneer will pick up the tags
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- run: uv sync --dev -P "pycalphad @ git+https://github.com/pycalphad/pycalphad.git@develop"
# Build HTML and LaTeX docs
# Treat all warnings as errors and "keep-going" to collect all warnings
- run: uv run sphinx-build --fail-on-warning --keep-going docs/ docs/_build

# PyTest: Run automated tests with PyTest using both release and development versions of pycalphad
PyTest-release:
name: Test Python ${{ matrix.python-version }} - pycalphad release
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ _build
dask-worker-space
*.egg-info/

# Sphinx documentation
docs/_build

# Editors
*.sublime-project
*.sublime-workspace
Expand Down
20 changes: 0 additions & 20 deletions .readthedocs.yml

This file was deleted.

472 changes: 472 additions & 0 deletions CHANGES.md

Large diffs are not rendered by default.

Loading
Loading