Skip to content

Commit

Permalink
Merge pull request wannier-developers#470 from qiaojunfeng/mkdocs
Browse files Browse the repository at this point in the history
Migrate user guide/examples to mkdocs
  • Loading branch information
giovannipizzi authored Feb 16, 2024
2 parents cbd556c + 89a9a7c commit 749315b
Show file tree
Hide file tree
Showing 599 changed files with 13,284 additions and 43,153 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docs_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI test docs
on:
pull_request:
paths:
- docs/**

jobs:
docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-w90-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-w90-
- run: pip install -r docs/requirements.txt
- run: mkdocs build -s
working-directory: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_MKDOCS_GIT_COMMITTERS: False
19 changes: 19 additions & 0 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- master

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy docs
uses: mhausenblas/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_MKDOCS_GIT_COMMITTERS: True
13 changes: 11 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@ repos:
rev: v4.1.0
hooks:
- id: check-yaml
exclude: (?x)^(
docs/mkdocs.yml
)$
- id: check-yaml
name: check yaml unsafe
args: ['--unsafe']
files: (?x)^(
docs/mkdocs.yml
)$
- id: trailing-whitespace
files: (?x)^(
config/make[.]inc[.\w]*|
examples/example\d\d[-]?\w*/.+win
tutorials/tutorial\d\d[-]?\w*/.+win
)$
- id: end-of-file-fixer
files: (?x)^(
config/make[.]inc[.\w]*|
examples/example\d\d[-]?\w*/.+win
tutorials/tutorial\d\d[-]?\w*/.+win
)$
- repo: https://github.com/pseewald/fprettify
rev: v0.3.3
Expand Down
246 changes: 0 additions & 246 deletions doc/.gitignore

This file was deleted.

Binary file removed doc/compiled_docs/tutorial.pdf
Binary file not shown.
Binary file removed doc/compiled_docs/user_guide.pdf
Binary file not shown.
13 changes: 0 additions & 13 deletions doc/tutorial/.gitignore

This file was deleted.

Loading

0 comments on commit 749315b

Please sign in to comment.