diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b389a1c..e99d61f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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 @@ -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 diff --git a/src/SUMMARY.md b/src/SUMMARY.md index a8371b0..3804860 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -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)