Skip to content

Commit ec36af8

Browse files
authored
Merge pull request #9 from scientificcomputing/dokken/restructure-repo
Move _toc and _config to root
2 parents 02fdc1a + 6ebc004 commit ec36af8

6 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/build_docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main"]
7+
branches:
8+
- "**"
89

910
# Allows you to run this workflow manually from the Actions tab
1011
workflow_dispatch:
@@ -51,6 +52,7 @@ jobs:
5152

5253
# Single deploy job since we're just deploying
5354
deploy:
55+
if: github.ref == 'refs/heads/main'
5456
needs: build
5557
environment:
5658
name: github-pages

hooks/post_gen_project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
'.github/workflows/check_formatting.yml',
1616
'.flake8',
1717
'.github/workflows/build_docs.yml',
18-
'docs/_config.yml',
19-
'docs/_toc.yml',
2018
'docs/api.rst',
21-
'docs/index.md',
2219
'docs/logo.png',
2320
'docs',
21+
'_config.yml',
22+
'_toc.yml',
23+
'index.md',
2424
{% endif %}
2525
{%- if cookiecutter.docker|lower != "y" %}
2626
'Dockerfile',

{{cookiecutter.repository_name}}/.github/workflows/build_docs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ name: Deploy static content to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main"]
7+
branches:
8+
- "**"
89

910
# Allows you to run this workflow manually from the Actions tab
1011
workflow_dispatch:
@@ -22,7 +23,7 @@ concurrency:
2223

2324
env:
2425
# Directory that will be published on github pages
25-
PUBLISH_DIR: ./docs/_build/html
26+
PUBLISH_DIR: ./_build/html
2627

2728
jobs:
2829

@@ -42,7 +43,7 @@ jobs:
4243
run: python3 -m pip install ".[docs]"
4344

4445
- name: Build docs
45-
run: jupyter book build -W docs
46+
run: jupyter book build -W .
4647

4748
- name: Upload artifact
4849
uses: actions/upload-pages-artifact@v1
@@ -51,6 +52,7 @@ jobs:
5152

5253
# Single deploy job since we're just deploying
5354
deploy:
55+
if: github.ref == 'refs/heads/main'
5456
needs: build
5557
environment:
5658
name: github-pages

{{cookiecutter.repository_name}}/docs/_config.yml renamed to {{cookiecutter.repository_name}}/_config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
title: {{ cookiecutter.project_name }}
55
author: {{ cookiecutter.full_name }}
6-
logo: "logo.png"
6+
logo: "docs/logo.png"
77
copyright: "{% now 'utc', '%Y' %}"
88

99
# Force re-execution of notebooks on each build.
@@ -30,4 +30,6 @@ sphinx:
3030
extra_extensions:
3131
- 'sphinx.ext.autodoc'
3232
- 'sphinx.ext.napoleon'
33-
- 'sphinx.ext.viewcode'
33+
- 'sphinx.ext.viewcode'
34+
35+
exclude_patterns: ["README.md",]

{{cookiecutter.repository_name}}/docs/_toc.yml renamed to {{cookiecutter.repository_name}}/_toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ root: index
44
parts:
55
- caption: Python API
66
chapters:
7-
- file: "api"
7+
- file: "docs/api"
File renamed without changes.

0 commit comments

Comments
 (0)