Update Gitfolio #522
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: "Update Gitfolio" | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 0 */3 * *" | |
watch: | |
types: [started] | |
env: | |
TZ: Asia/Shanghai | |
jobs: | |
Gitfolio-Spider: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: "Set up Python" | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: "Install dependencies" | |
run: python -m pip install --upgrade pip | |
- name: "Install requirements" | |
run: pip install -r ./requirements.txt | |
- name: "Logging" | |
run: | | |
echo `date +"%Y-%m-%d %H:%M:%S"` > time.log | |
- name: "Working" | |
timeout-minutes: 350 | |
run: bash ./main.sh | |
- name: Commit files | |
run: | | |
git config --local user.email "i@ningkai.wang" | |
git config --local user.name "Wang Ningkai" | |
git add -A | |
git commit -m "Update Gitfolio at $(date +'%Y-%m-%d %H:%M')" -a | |
- name: "Push changes" | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true |