Fetch arxiv daily #2609
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch arxiv daily | |
on: | |
schedule: | |
- cron: '0 3,9,15,21 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: download | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: | | |
python cn_chat_arxiv.py | |
- name: Create local changes | |
run: | | |
git add . | |
- name: Commit files | |
run: | | |
git config --local user.email "mail@qhduan.com" | |
git config --local user.name "qhduan" | |
git commit -m "Add changes" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.DEPENDABOT_TOKEN }} | |
branch: ${{ github.ref }} |