Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jmduarte committed Mar 31, 2024
1 parent ad6cbff commit 403bbac
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 68 deletions.
115 changes: 59 additions & 56 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,74 @@ name: deploy-book
on:
push:
branches:
- main
- main

# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

# Install dependencies
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: phys139
environment-file: notebooks/environment.yml
python-version: 3.9
auto-activate-base: false
# Install dependencies
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
use-mamba: true
channels: conda-forge
activate-environment: phys139
environment-file: notebooks/environment.yml
python-version: 3.10.10
auto-activate-base: false

# Check dependencies
- name: Check Miniconda
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
# Check dependencies
- name: Check Miniconda
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Build the book
shell: bash -l {0}
run: |
jupyter contrib nbextension install --user
jupyter nbextension enable --py widgetsnbextension
jupyter-book build notebooks
- name: Build the book
shell: bash -l {0}
run: |
jupyter contrib nbextension install --user
jupyter nbextension enable --py widgetsnbextension
jupyter-book build notebooks
- name: Compile LaTeX
uses: docker://xucheng/texlive-full:latest
with:
entrypoint: /bin/sh
args: |
-c "\
cd syllabus && \
latexmk && \
cd ../homeworks/homework_1 && \
pdflatex homework_1 && \
cd ../homework_2 && \
pdflatex homework_2 && \
cd ../homework_3 && \
pdflatex homework_3 && \
cd ../homework_4 && \
pdflatex homework_4"
- name: Compile LaTeX
uses: docker://xucheng/texlive-full:latest
with:
entrypoint: /bin/sh
args: |
-c "\
cd syllabus && \
latexmk && \
cd ../homeworks/homework_1 && \
pdflatex homework_1 && \
cd ../homework_2 && \
pdflatex homework_2 && \
cd ../homework_3 && \
pdflatex homework_3 && \
cd ../homework_4 && \
pdflatex homework_4"
- name: Copy syllabus and homework for deployment
run: |
cp syllabus/syllabus.pdf notebooks/_build/html/syllabus.pdf && \
cp homeworks/homework_1/homework_1.pdf notebooks/_build/html/homework_1.pdf && \
cp homeworks/homework_2/homework_2.pdf notebooks/_build/html/homework_2.pdf && \
cp homeworks/homework_3/homework_3.pdf notebooks/_build/html/homework_3.pdf && \
cp homeworks/homework_4/homework_4.pdf notebooks/_build/html/homework_4.pdf
- name: Copy syllabus and homework for deployment
run: |
cp syllabus/syllabus.pdf notebooks/_build/html/syllabus.pdf && \
cp homeworks/homework_1/homework_1.pdf notebooks/_build/html/homework_1.pdf && \
cp homeworks/homework_2/homework_2.pdf notebooks/_build/html/homework_2.pdf && \
cp homeworks/homework_3/homework_3.pdf notebooks/_build/html/homework_3.pdf && \
cp homeworks/homework_4/homework_4.pdf notebooks/_build/html/homework_4.pdf
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: notebooks/_build/html
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: notebooks/_build/html
force_orphan: true
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
19 changes: 7 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,24 @@ name: build-and-push
on:
push:
branches:
- 'main'
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
Expand Down

0 comments on commit 403bbac

Please sign in to comment.