CI #148
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: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
jobs: | |
all: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4.2.0 | |
with: | |
python-version: 3.10.4 | |
- name: Install wkhtmltopdf | |
uses: tecoli-com/actions-use-apt-tools@v0.4 | |
with: | |
tools: wkhtmltopdf | |
cache: true | |
- name: Install fonts-wqy-microhei | |
uses: tecoli-com/actions-use-apt-tools@v0.4 | |
with: | |
tools: fonts-wqy-microhei | |
cache: true | |
- name: Install ttf-wqy-microhei | |
uses: tecoli-com/actions-use-apt-tools@v0.4 | |
with: | |
tools: ttf-wqy-microhei | |
cache: true | |
- name: Install ttf-wqy-zenhei | |
uses: tecoli-com/actions-use-apt-tools@v0.4 | |
with: | |
tools: ttf-wqy-zenhei | |
cache: true | |
- name: Install fonts-moe-standard-song | |
uses: tecoli-com/actions-use-apt-tools@v0.4 | |
with: | |
tools: fonts-moe-standard-song | |
cache: true | |
- name: Install ttf-mscorefonts-installer | |
uses: tecoli-com/actions-use-apt-tools@v0.4 | |
with: | |
tools: ttf-mscorefonts-installer | |
cache: true | |
- name: Install pip package | |
run: pip install -r requirements.txt | |
- name: Run the main script | |
run: python main.py | |
- name: Git add files | |
run: git add -A | |
- name: Github commit and push | |
uses: Smart-Transportation/push@v1.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
repository: smallyunet/yinwang-blog-backup | |
branch: main |