ci #824
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 * * *' | |
watch: | |
types: [started] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
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: python3 get_version.py | |
- run: python3 get_tip.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 }} |