replaced unnecessary systeme with align* #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Textbook | |
on: | |
push: | |
branches: ["master", "main"] | |
pull_request: | |
branches: ["master", "main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run makedist.sh in Docker container | |
run: | | |
cd ./ci | |
./prepare-for-ci.sh | |
docker compose up -d | |
docker compose exec -T ibllinearalgebra ./makedist.sh | |
docker compose down | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: textbook | |
path: ci/dist/ | |
- name: Verifies all PDFs were built | |
run: | | |
cd ./ci | |
./verify-all-compiled.sh | |
pretext_conversion: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Run prepare-for-pretext-conversion.sh | |
run: | | |
cd ./ci | |
./prepare-for-pretext-conversion.sh | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: textbook-pretext | |
path: ci/book-pretext/pretext-output | |
pretext_build: | |
runs-on: ubuntu-latest | |
needs: pretext_conversion | |
# Run in the pretext docker container | |
container: | |
image: oscarlevin/pretext:small | |
steps: | |
- name: Echo pretext version | |
run: pretext support | |
# fetch the `textbook-pretext` artifact and unzip it | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: textbook-pretext | |
path: ci/book-pretext/pretext-output | |
# Build the book | |
- name: Build pretext book | |
run: | | |
cd ci/book-pretext/pretext-output | |
pretext build web | |
# List files in the output directory | |
- name: List files in output directory | |
run: ls -shR ci/book-pretext/pretext-output/output/web | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: textbook-pretext-output | |
path: ci/book-pretext/pretext-output/output/web | |
build_website: | |
runs-on: ubuntu-latest | |
# needs pretext_build and build jobs to finish | |
needs: [pretext_build, build] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download textbook PDFs | |
uses: actions/download-artifact@v4 | |
with: | |
name: textbook | |
path: website/landing-page/assets/nightly-pdf | |
- name: Download pretext website | |
uses: actions/download-artifact@v4 | |
with: | |
name: textbook-pretext-output | |
path: website/landing-page/assets/textbook | |
- name: Copy prebuilt files to website | |
run: | | |
mkdir -p website/landing-page/assets/pdf | |
cp ./dist/*.pdf ./website/landing-page/assets/pdf/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: website | |
path: website/landing-page | |
deploy_to_github_pages: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
needs: build_website | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Download website artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: website | |
path: website | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./website" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |