Skip to content

Commit d5eea5e

Browse files
committed
Add archive page
1 parent 416f7c9 commit d5eea5e

2 files changed

Lines changed: 34 additions & 25 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ name: Deploy
77
on:
88
# Runs on pushes targeting the default branch
99
push:
10-
branches: ["main"]
10+
branches:
11+
- main
12+
- 'ss*'
13+
- 'ws*'
1114

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

1518
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1619
permissions:
17-
contents: read
20+
contents: write
1821
pages: write
1922
id-token: write
2023

@@ -25,13 +28,15 @@ concurrency:
2528
cancel-in-progress: false
2629

2730
jobs:
28-
# Build job
29-
build:
31+
build-and-deploy:
3032
runs-on: ubuntu-latest
3133
env:
3234
MDBOOK_VERSION: 0.4.37
3335
steps:
36+
# get the source code
3437
- uses: actions/checkout@v4
38+
39+
# install mdBook and preprocessors
3540
- name: Install mdBook
3641
run: |
3742
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
@@ -44,26 +49,30 @@ jobs:
4449
cargo install mdbook-katex --locked --version 0.6.0
4550
cargo install mdbook-numeq --locked --version 0.3.0
4651
cargo install --git https://github.com/xmiaocat/mdbook-chapter-zero#e50441d
47-
cargo install mdbook-shiftinclude --locked --version 0.1.0
48-
- name: Setup Pages
49-
id: pages
50-
uses: actions/configure-pages@v4
52+
53+
# build the book
5154
- name: Build with mdBook
52-
run: |
53-
mdbook build
54-
- name: Upload artifact
55-
uses: actions/upload-pages-artifact@v3
55+
run: mdbook build
56+
57+
# deploy main branch
58+
- name: Deploy main branch
59+
if: github.ref_name == 'main'
60+
uses: JamesIves/github-pages-deploy-action@v4
5661
with:
57-
path: ./book
62+
branch: gh-pages
63+
folder: book
64+
clean: true
65+
clean-exclude: |
66+
ss*
67+
ws*
68+
69+
# deploy archive branche
70+
- name: Deploy archive branches
71+
if: github.ref_name != 'main'
72+
uses: JamesIves/github-pages-deploy-action@v4
73+
with:
74+
branch: gh-pages
75+
folder: book
76+
target-folder: ${{ github.ref_name }}
77+
clean: true
5878

59-
# Deployment job
60-
deploy:
61-
environment:
62-
name: github-pages
63-
url: ${{ steps.deployment.outputs.page_url }}
64-
runs-on: ubuntu-latest
65-
needs: build
66-
steps:
67-
- name: Deploy to GitHub Pages
68-
id: deployment
69-
uses: actions/deploy-pages@v4

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- [Harmonic Oscillator](02-symbolic_computation/04-harmonic_oscillator.md)
3131

3232
- [Molecular Integrals](03-molecular_integrals.md)
33-
- [Latest Scripts](03-molecular_integrals/00-latest_scripts.md)
33+
- [Latest Scripts]()
3434
- [Gaussian Type Orbitals](03-molecular_integrals/01-gaussian_orbitals.md)
3535
- [Hermite Gaussians](03-molecular_integrals/02-hermite_gaussians.md)
3636
- [Overlap Integrals](03-molecular_integrals/03-overlap_integrals.md)

0 commit comments

Comments
 (0)