-
Notifications
You must be signed in to change notification settings - Fork 21
61 lines (58 loc) · 2.12 KB
/
arxiv-daily.yml
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
name: Run Arxiv Papers Daily
on:
workflow_dispatch:
schedule:
- cron: "* 0/12 * * *" #'*/60 * * * *'
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
env:
TZ: "Asia/Shanghai"
RUN_ENV: "production" # within ['production', 'development']
POWER: 16
steps:
# ============================================
# TODO [√] 检查工作分支及 Workflows 运行环境
# ============================================
- name: Checkout
uses: actions/checkout@v2
# ============================================
# TODO [√] 创建 Python3.6+ 编译环境
# ============================================
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
# ============================================
# TODO [√] 安装 Project 第三方依赖
# ============================================
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# ============================================
# TODO [√] 测试 Scaffold 脚手架指令
# ============================================
- name: Run daily arxiv
run: |
python main.py run --env=${{ env.RUN_ENV }} --power=${{ env.POWER }}
# ============================================
# TODO [√] 更新仓库数据
# ============================================
- name: Setup GIT user
uses: fregante/setup-git-user@v1
- name: Push done work
run: |
git add --all
git commit -m "Automated deployment @ $(date '+%Y-%m-%d %H:%M:%S') ${{ env.TZ }}"
git push --force origin main
# ============================================
# TODO [√] 更新 mkdocs
# ============================================
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@nomaterial
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REQUIREMENTS: requirements-mkdocs.txt