Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 33 additions & 23 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ name: Deploy
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches:
- main
- 'ss*'
- 'ws*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
contents: write
pages: write
id-token: write

Expand All @@ -25,13 +28,15 @@ concurrency:
cancel-in-progress: false

jobs:
# Build job
build:
build-and-deploy:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.37
steps:
# get the source code
- uses: actions/checkout@v4

# install mdBook and preprocessors
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
Expand All @@ -45,25 +50,30 @@ jobs:
cargo install mdbook-numeq --locked --version 0.3.0
cargo install --git https://github.com/xmiaocat/mdbook-chapter-zero#e50441d
cargo install mdbook-shiftinclude --locked --version 0.1.0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

# build the book
- name: Build with mdBook
run: |
mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
run: mdbook build

# deploy main branch
- name: Deploy main branch
if: github.ref_name == 'main'
uses: JamesIves/github-pages-deploy-action@v4
with:
path: ./book
branch: gh-pages
folder: book
clean: true
clean-exclude: |
ss*
ws*

# deploy archive branche
- name: Deploy archive branches
if: github.ref_name != 'main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: book
target-folder: ${{ github.ref_name }}
clean: true

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
- [Harmonic Oscillator](02-symbolic_computation/04-harmonic_oscillator.md)

- [Molecular Integrals](03-molecular_integrals.md)
- [Latest Scripts](03-molecular_integrals/00-latest_scripts.md)
- [Latest Scripts]()
- [Gaussian Type Orbitals](03-molecular_integrals/01-gaussian_orbitals.md)
- [Hermite Gaussians](03-molecular_integrals/02-hermite_gaussians.md)
- [Overlap Integrals](03-molecular_integrals/03-overlap_integrals.md)
Expand Down