Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 👋👋 Travis - Welcome GH actions #197

Merged
merged 2 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-r ../../requirements.txt
git+https://github.com/jakevdp/JSAnimation.git
nbconvert==5.6.1
# https://github.com/jupyter/nbgrader/issues/1373#issuecomment-702798246
jupyter-client==6.1.12
# https://github.com/jupyter/jupyter_client/issues/637
git+https://github.com/ucl-rits/greeter.git
line_profiler
13 changes: 13 additions & 0 deletions .github/texlive/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pandoc
texlive-base
texlive-latex-base
texlive-latex-recommended
texlive-latex-extra
texlive-fonts-recommended
texlive-xetex
texlive-science
tree
lmodern
fonts-cmu
inkscape
ffmpeg
43 changes: 43 additions & 0 deletions .github/workflows/build_site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build website
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Build-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2 # FIXME: add pip + latex + gems
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
Comment on lines +18 to +19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned this will lead to weird behaviour if we change the Gemfile dependencies. I would prefer to regenerate the cache in that case. Do we need the restore-keys?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change the dependencies, then the new version will be installed as directed by the gemfile. This will copy the previous version there. In any case, we can always delete the cache.

- name: Install TeXLive
uses: DanySK/setup-texlive-action@0.1.1
- id: setup-python
name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
uses: py-actions/py-dependency-install@v2
with:
path: ".github/python/requirements.txt"
- name: Building notes
run: make ready
- name: Builds website
uses: helaili/jekyll-action@v2
with:
target_branch: 'gh-pages'
build_only: true
- name: Build website and deploy
if: github.ref == 'refs/heads/master'
uses: helaili/jekyll-action@v2
with:
target_branch: 'gh-pages'
token: ${{ secrets.GITHUB_TOKEN }}
62 changes: 0 additions & 62 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'jekyll', '~> 3.1.6'
gem 'redcarpet', '~> 3.5.0'
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ include:
- "ch04packaging/greetings/doc/_static"
- "ch04packaging/greetings/doc/_modules"
exclude:
- vendor/
- Gemfile
- Gemfile.lock
- "*/*.nbconvert.ipynb"
- "*/*.v2.ipynb"
- "combined_files"
Expand Down
Binary file removed secrets.tar.enc
Binary file not shown.