Skip to content

[codex] Add OpenAlex and Altmetric publication badges #350

[codex] Add OpenAlex and Altmetric publication badges

[codex] Add OpenAlex and Altmetric publication badges #350

Workflow file for this run

name: Deploy site
on:
push:
branches:
- master
- main
paths:
- "assets/**"
- "_sass/**"
- "_scripts/**"
- "**.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/**"
- "_sass/**"
- "_scripts/**"
- "**.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: read
jobs:
build:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Setup Ruby
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f
with:
ruby-version: "3.3.5"
bundler-cache: true
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.13"
cache: "pip"
- 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
deploy:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Setup Ruby
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f
with:
ruby-version: "3.3.5"
bundler-cache: true
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.13"
cache: "pip"
- name: Set giscus repo
run: |
ruby -ryaml -e 'path = "_config.yml"; config = YAML.load_file(path); config["giscus"] ||= {}; config["giscus"]["repo"] = ENV.fetch("GITHUB_REPOSITORY"); File.write(path, config.to_yaml)'
- 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
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f
with:
folder: _site