diff --git a/.github/python/requirements.txt b/.github/python/requirements.txt new file mode 100644 index 000000000..d45f3f000 --- /dev/null +++ b/.github/python/requirements.txt @@ -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 diff --git a/.github/texlive/requirements.txt b/.github/texlive/requirements.txt new file mode 100644 index 000000000..bceddd675 --- /dev/null +++ b/.github/texlive/requirements.txt @@ -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 diff --git a/.github/workflows/build_site.yml b/.github/workflows/build_site.yml new file mode 100644 index 000000000..c1bc7fe53 --- /dev/null +++ b/.github/workflows/build_site.yml @@ -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- + - 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 }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0efed23c6..000000000 --- a/.travis.yml +++ /dev/null @@ -1,62 +0,0 @@ -dist: bionic -sudo: required -language: python -python: -- '3.7' -cache: - - pip - - apt -addons: - apt: - packages: - - pandoc - - texlive-latex-base - - texlive-latex-extra - - tree - - texlive-fonts-recommended - - texlive-latex-recommended - - texlive-generic-recommended - - texlive-generic-extra - - texlive-science - - texlive-xetex - - lmodern - - fonts-cmu - - inkscape - - ffmpeg - -deploy: - provider: pages - skip-cleanup: true - github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable - email: rc-softdev@ucl.ac.uk - keep-history: true - local-dir: _site - verbose: true - on: - branch: master - -install: -- pip install --upgrade setuptools wheel -- pip install -r requirements.txt -- pip install git+https://github.com/ucl-rits/greeter.git -- pip install git+https://github.com/rkern/line_profiler.git -- gem install liquid -v 3.0.6 -- gem install jekyll -v 3.1.6 -- gem install redcarpet - -script: -- python -c "import matplotlib.pyplot" -- ls ch04packaging/*ipynb -- make -before_install: -# Remove the MongoDB repo as their GPG key has expired. -# - sudo rm /etc/apt/sources.list.d/mongodb-3.2.list -- openssl aes-256-cbc -K $encrypted_e058bed9e333_key -iv $encrypted_e058bed9e333_iv - -in secrets.tar.enc -out secrets.tar -d -- tar -xvf secrets.tar -- REPO=`git config remote.origin.url` -- SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} -- eval `ssh-agent -s` -- chmod 600 deploy_key -- ssh-add deploy_key -after_success: diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..b73daeced --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'jekyll', '~> 3.1.6' +gem 'redcarpet', '~> 3.5.0' diff --git a/_config.yml b/_config.yml index e7f4d4aa5..1777c80ce 100644 --- a/_config.yml +++ b/_config.yml @@ -30,6 +30,9 @@ include: - "ch04packaging/greetings/doc/_static" - "ch04packaging/greetings/doc/_modules" exclude: + - vendor/ + - Gemfile + - Gemfile.lock - "*/*.nbconvert.ipynb" - "*/*.v2.ipynb" - "combined_files" diff --git a/secrets.tar.enc b/secrets.tar.enc deleted file mode 100644 index ccf45d3f9..000000000 Binary files a/secrets.tar.enc and /dev/null differ