Skip to content

Commit d6232d5

Browse files
committed
adding deploy yaml
1 parent 017ef82 commit d6232d5

File tree

5 files changed

+70
-0
lines changed

5 files changed

+70
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [gh-pages]
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "0 7 * * 0" # Sundays 07:00 UTC
9+
10+
permissions:
11+
contents: write
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: scholar-update
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout your repository using git
24+
uses: actions/checkout@v4
25+
26+
- name: Install, build, and upload your site output
27+
uses: withastro/action@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.11"
33+
34+
- name: Install Python deps
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install scholarly
38+
pip install bibtexparser
39+
40+
# - name: Update publications file
41+
# run: |
42+
# python scripts/update_pubs.py
43+
44+
- name: Commit & push if changed
45+
run: |
46+
if git diff --quiet; then
47+
echo "No changes to commit."
48+
exit 0
49+
fi
50+
git config user.name "github-actions[bot]"
51+
git config user.email "github-actions[bot]@users.noreply.github.com"
52+
git add -A
53+
git commit -m "chore: update publications from Google Scholar"
54+
git push
55+
56+
deploy:
57+
needs: build
58+
runs-on: ubuntu-latest
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

scripts/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# DO NOT TOUCH
2+
3+
Script to automatically read off publication from [YaoYi's Google Scholar page](https://scholar.google.com/citations?hl=en&user=Xf3M93cAAAAJ&view_op=list_works&sortby=pubdate#/)
4+
5+
UserID: Xf3M93cAAAAJ

scripts/local_data_control.py

Whitespace-only changes.

scripts/resolve_ambig.py

Whitespace-only changes.

scripts/update_pubs.py

Whitespace-only changes.

0 commit comments

Comments
 (0)