Skip to content

Commit

Permalink
Merge pull request #81 from stefmolin/doc-build
Browse files Browse the repository at this point in the history
Add doc build action.


skip-checks: true
  • Loading branch information
stefmolin authored Apr 2, 2023
2 parents 478a961 + a1b4eaf commit 0804fa2
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data:
- src/data_morph/data/**/*

documentation:
- '.github/workflows/docs.yml'
- docs/**/*
- README.rst

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow builds the Data Morph documentation and publishes it using GitHub pages.
#
# Based on https://olgarithms.github.io/sphinx-tutorial/docs/8-automating-documentation-updates.html
#
# Author: Stefanie Molin

name: Deploy Docs

on:
push:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: Build and deploy docs.

runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install dependencies
run: |
pip install '.[docs]'
- name: git config
run: |
git config user.email "Stefanie Molin"
git config user.name "[email protected]"
- name: Sphinx build
run: |
git worktree add docs/_build/html gh-pages
cd docs
make html
- name: Deploy docs
run: |
cd docs/_build/html
git add --all
git commit -m "Update documentation."
git push origin gh-pages

0 comments on commit 0804fa2

Please sign in to comment.