Skip to content

[post] new post

[post] new post #169

Workflow file for this run

name: Backup Blog Img
on:
push:
branches: [ hexo ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get install wget
python -m pip install --upgrade pip
python -m pip install fonttools brotli requests
git config --global user.name "SouthFox-D"
git config --global user.email "[email protected]"
- name: Check Img
run: |
wget https://raw.githubusercontent.com/SouthFox-D/blog_img/main/imgList.json
python3 utils.py -b
- name: Backup
env:
DEPLOY_KEY: ${{ secrets.HEXO_DEPLOY }}
run: |
git clone https://github.com/SouthFox-D/blog_img.git blog_img
cp -f newimg/* blog_img
cd blog_img
git add .
git commit -m "Auto backup" || echo "Nothing to push"
git push --force https://[email protected]/SouthFox-D/blog_img.git