Skip to content

Commit

Permalink
Merge pull request #33 from GWC-DCMB/build-workflow
Browse files Browse the repository at this point in the history
Stop compiling PDFs in build workflow
  • Loading branch information
zenalapp authored Dec 10, 2021
2 parents ddb73d7 + 065d709 commit 8c4bcf5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 35 deletions.
73 changes: 39 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,42 @@ jobs:
python-version: [3.7]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install texlive-xetex pandoc
pip install jupyter nbconvert
- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub"
- name: Clean colab metadata
run: |
python .github/clean_colab_metadata.py Lessons/*.ipynb Lessons/_Keys/*.ipynb Practices/*.ipynb Practices/_Keys/*.ipynb
git add Lessons/ Practices/
git commit -m "🧹 Clean colab metadata" --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" || echo "No changes to commit"
- name: Compile PDFs
run: |
jupyter nbconvert --to pdf --output-dir=Lessons/_Keys/pdf Lessons/_Keys/*.ipynb
jupyter nbconvert --to pdf --output-dir=Practices/_Keys/pdf Practices/_Keys/*.ipynb
git add Lessons/ Practices/
git commit -m "📄 Compile PDFs" --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" || echo "No changes to commit"
- name: Push changes
run: |
git push
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install texlive-xetex pandoc
pip install jupyter nbconvert
- name: Configure git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub"
- name: Clean colab metadata
run: |
python .github/clean_colab_metadata.py Lessons/*.ipynb Lessons/_Keys/*.ipynb Practices/*.ipynb Practices/_Keys/*.ipynb
git add Lessons/ Practices/
git commit -m "🧹 Clean colab metadata" --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" || echo "No changes to commit"
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}

# - name: Compile PDFs
# run: |
# jupyter nbconvert --to pdf --output-dir=Lessons/_Keys/pdf Lessons/_Keys/*.ipynb
# jupyter nbconvert --to pdf --output-dir=Practices/_Keys/pdf Practices/_Keys/*.ipynb
# git add Lessons/ Practices/
# git commit -m "📄 Compile PDFs" --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" || echo "No changes to commit"
2 changes: 1 addition & 1 deletion Lessons/_Keys/KEY_Lesson09_Conditionals.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
"We can do a lot of really powerful things with `if/elif/else` statements! Let's start by writing code that does the following:\n",
"- If my_list has less than 10 items, print a message saying the list is \"short\"\n",
"- If my_list has at least 10 items, but fewer than 15 items (so 10, 11, 12, 13, or 14 items), print a message saying the list is \"medium\"\n",
"- Otherwise, print a message saying the list is \"long\""
"- Otherwise, print a message saying the list is \"long\"\n"
]
},
{
Expand Down

0 comments on commit 8c4bcf5

Please sign in to comment.