ci #388
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: ci | |
on: | |
schedule: | |
- cron: '0 22 * * *' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
# if: github.event.repository.owner.id == github.event.sender.id # 自己点的 start | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- run: pip3 install -r requirements.txt | |
- run: python3 main.py | |
# - run: mkdocs gh-deploy --force | |
- name: commit | |
env: | |
TZ: 'CST-8' | |
emails: ${{ secrets.GITHUB_EMAIL }} | |
run: | | |
sudo timedatectl set-timezone Asia/Shanghai | |
git config --global user.email emails | |
git config --global user.name GithubActionBot | |
datime=$(date "+%Y年%m月%d日 %H:%M") | |
echo "git commit: push something, $datime" | |
if [ -n "$(git status -s)" ];then | |
git add . | |
git commit -m "make:action push $datime" -a | |
fi | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |