Skip to content

Add CI workflow for gh-pages branch #2

Add CI workflow for gh-pages branch

Add CI workflow for gh-pages branch #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [gh-pages]
workflow_dispatch:
schedule:
- cron: "0 7 * * 0" # Sundays 07:00 UTC
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: scholar-update
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install scholarly
pip install bibtexparser
# - name: Update publications file
# run: |
# python scripts/update_pubs.py
- name: Commit & push if changed
run: |
if git diff --quiet; then
echo "No changes to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore: update publications from Google Scholar"
git push
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4