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

refactor: update packaging content + better site infra #240

Merged
merged 6 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
43 changes: 25 additions & 18 deletions .github/workflows/build_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
Build-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Adds keys to work with other repositories used in this lesson (e.g., UCL/github-example)
- uses: webfactory/ssh-agent@v0.5.4
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/cache@v2 # FIXME: add apt(latex)
- uses: actions/cache@v4 # FIXME: add apt(latex)
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '.github/python/requirements.txt') }}
Expand All @@ -31,23 +31,30 @@ jobs:
uses: DanySK/setup-texlive-action@0.1.1
- id: setup-python
name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12
- name: Install dependencies
uses: py-actions/py-dependency-install@v2
with:
path: ".github/python/requirements.txt"
run: python -m pip install -r .github/python/requirements.txt
- name: Building notes
run: make ready
- name: Builds website
uses: helaili/jekyll-action@v2
- uses: ruby/setup-ruby@v1
with:
target_branch: 'gh-pages'
build_only: true
- name: Build website and deploy
if: github.ref == 'refs/heads/main'
uses: helaili/jekyll-action@v2
ruby-version: '3.3'
- name: Install bundler and dependencies
run: |
gem install bundler
bundle install
- name: Build website
run: bundle exec jekyll build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
target_branch: 'gh-pages'
token: ${{ secrets.GITHUB_TOKEN }}
path: _site
- name: Deploy to GitHub Pages
if: >
success()
&& github.ref == 'refs/heads/main'
&& github.repository == 'UCL/rsd-engineeringcourse'
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@ master.zip
session04/greetings/Greetings.egg-info/
session04/greetings/doc/
session04/greetings/scripts/
Gemfile.lock
.env/

3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source 'https://rubygems.org'

gem 'jekyll', '~> 4.2.1'
gem "jekyll"
gem 'kramdown', '~> 2.3.1'
gem "jekyll-remote-theme"
gem "jekyll-sass-converter"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ $ docker run --rm --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/
and open http://localhost:4000/rsd-engineeringcourse (or the link provided).
Note that this is mounting the `bundle` directory where `act` will create them.


# Migration from jupyter notebooks to py:percent

Using `jupytext` we've converted all the jupyter notebooks into plain text python files (py:percent) with:
Expand Down
Loading
Loading