Skip to content

Commit

Permalink
Merge pull request #85 from RichRick1/website
Browse files Browse the repository at this point in the history
Website
  • Loading branch information
RichRick1 authored Apr 12, 2024
2 parents 3405414 + 50dfab9 commit 808f7f8
Show file tree
Hide file tree
Showing 71 changed files with 408 additions and 20,439 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: deploy-book

# Only run this when the master branch changes
on:
push:
branches:
- main
- website

pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
permissions:
pages: write
# https://github.com/JamesIves/github-pages-deploy-action/issues/1110
contents: write

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: Install package
run: |
python3 -m pip install .
- name: Install dependencies
run: |
python3 -m pip install -r website/requirements.txt
# Add soft links to the notebooks
- name: Add soft links to the notebooks
run: |
cd website
ln -s ../examples ./examples
ln -s ../docs/ ./api
cd ../
# Build the book
- name: Build the website
run: |
jupyter-book build ./website/
# Push the book's HTML to github-pages
# inspired by https://github.com/orgs/community/discussions/26724
# only push to gh-pages if the master branch has been updated
- name: GitHub Pages Action
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/_build/html
publish_branch: gh-pages
cname: moha.qcdevs.org
Empty file removed docs/.nojekyll
Empty file.
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Hamiltonian API
===============

.. autoclass:: moha.api.HamiltonianAPI
:members:

Binary file removed docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/build/doctrees/index.doctree
Binary file not shown.
4 changes: 0 additions & 4 deletions docs/build/html/.buildinfo

This file was deleted.

37 changes: 0 additions & 37 deletions docs/build/html/_sources/index.rst.txt

This file was deleted.

Loading

0 comments on commit 808f7f8

Please sign in to comment.