Skip to content

Commit 4cb86de

Browse files
Workflow v2 (#2)
* minor fixes * minor fixes * rename doc to docs * Added makefile to docs directory * Setup conda
1 parent 840160f commit 4cb86de

11 files changed

Lines changed: 53 additions & 50 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/sphinx.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Sphinx: Render docs"
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
14+
- name: Set up conda
15+
uses: conda-incubator/setup-miniconda@v3
16+
with:
17+
auto-activate-base: true
18+
activate-environment: tfe-docs
19+
environment-file: environment.yml
20+
- name: Build HTML
21+
shell: bash -l {0}
22+
run: cd docs && make html
23+
- name: Upload artifacts
24+
uses: actions/upload-artifact@v4
25+
with:
26+
name: html-docs
27+
path: docs/build/html/
28+
- name: Deploy
29+
uses: peaceiris/actions-gh-pages@v3
30+
if: github.ref == 'refs/heads/main'
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: docs/build/html

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)