-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (53 loc) · 1.42 KB
/
deploy.yml
File metadata and controls
62 lines (53 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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