Install `imagemagick` within `Install and Build 🔧` step of Github actions Relevant issue: [#2902](https://github.com/alshedivat/al-folio/issues/2902) `convert` Command Not Found on Ubuntu 24.04 Reason: `ubuntu-latest` in Github actions is pointed to `ubuntu-24.04` now, in which `imagemagick` is no longer pre-installed. See [this](https://github.com/actions/runner-images/issues/10772). Modified files (actions) recommended by @george-gca ``` - .github/workflows/deploy.yml - .github/workflows/broken-links-site.yml - .github/workflows/axe.yml ```
102 lines
2.7 KiB
YAML
102 lines
2.7 KiB
YAML
name: Deploy site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
paths:
|
|
- "assets/**"
|
|
- "**.bib"
|
|
- "**.html"
|
|
- "**.js"
|
|
- "**.liquid"
|
|
- "**/*.md"
|
|
- "**.yml"
|
|
- "Gemfile"
|
|
- "Gemfile.lock"
|
|
- "!.github/workflows/axe.yml"
|
|
- "!.github/workflows/broken-links.yml"
|
|
- "!.github/workflows/deploy-docker-tag.yml"
|
|
- "!.github/workflows/deploy-image.yml"
|
|
- "!.github/workflows/docker-slim.yml"
|
|
- "!.github/workflows/lighthouse-badger.yml"
|
|
- "!.github/workflows/prettier.yml"
|
|
- "!lighthouse_results/**"
|
|
- "!CONTRIBUTING.md"
|
|
- "!CUSTOMIZE.md"
|
|
- "!FAQ.md"
|
|
- "!INSTALL.md"
|
|
- "!README.md"
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- main
|
|
paths:
|
|
- "assets/**"
|
|
- "**.bib"
|
|
- "**.html"
|
|
- "**.js"
|
|
- "**.liquid"
|
|
- "**/*.md"
|
|
- "**.yml"
|
|
- "Gemfile"
|
|
- "Gemfile.lock"
|
|
- "!.github/workflows/axe.yml"
|
|
- "!.github/workflows/broken-links.yml"
|
|
- "!.github/workflows/deploy-docker-tag.yml"
|
|
- "!.github/workflows/deploy-image.yml"
|
|
- "!.github/workflows/docker-slim.yml"
|
|
- "!.github/workflows/lighthouse-badger.yml"
|
|
- "!.github/workflows/prettier.yml"
|
|
- "!lighthouse_results/**"
|
|
- "!CONTRIBUTING.md"
|
|
- "!CUSTOMIZE.md"
|
|
- "!FAQ.md"
|
|
- "!INSTALL.md"
|
|
- "!README.md"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
deploy:
|
|
# available images: https://github.com/actions/runner-images#available-images
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout 🛎️
|
|
uses: actions/checkout@v4
|
|
- name: Setup Ruby 💎
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: "3.3.5"
|
|
bundler-cache: true
|
|
- name: Setup Python 🐍
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
cache: "pip" # caching pip dependencies
|
|
- name: Update _config.yml ⚙️
|
|
uses: fjogeleit/yaml-update-action@main
|
|
with:
|
|
commitChange: false
|
|
valueFile: "_config.yml"
|
|
propertyPath: "giscus.repo"
|
|
value: ${{ github.repository }}
|
|
- name: Install and Build 🔧
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y imagemagick
|
|
pip3 install --upgrade nbconvert
|
|
export JEKYLL_ENV=production
|
|
bundle exec jekyll build
|
|
- name: Purge unused CSS 🧹
|
|
run: |
|
|
npm install -g purgecss
|
|
purgecss -c purgecss.config.js
|
|
- name: Deploy 🚀
|
|
if: github.event_name != 'pull_request'
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
folder: _site
|