Skip to content

chore(deps): update dependency beautifulsoup4 to v4.13.0 #392

chore(deps): update dependency beautifulsoup4 to v4.13.0

chore(deps): update dependency beautifulsoup4 to v4.13.0 #392

name: Life recent auto update
on:
push:
branches:
- master
paths:
- "life/**"
- "!life/.vitepress/**"
- "!life/*"
- ".github/workflows/life-recent-update.yml"
- "script/requirements.txt"
# paths-ignore:
# - "life/.vitepress/**"
pull_request:
types: [opened, synchronize]
branches:
- master
paths:
- "life/**"
- "!life/.vitepress/**"
- "!life/*"
- ".github/workflows/life-recent-update.yml"
- "script/requirements.txt"
schedule:
# This is run at UTC 16:00 p.m., aka UTC+8 0:00 a.m.
- cron: "0 16 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
jobs:
py-life-recent:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./script
steps:
- name: Checkout repository content
uses: actions/checkout@v4
# https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches
# Fetch all history for all tags and branches
# for py script
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Execute Python script
run: |
python latest.py 1
- name: Commit files
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
if git diff --cached --quiet; then
echo "No changes to commit"
echo "has_changes=false" >> $GITHUB_OUTPUT
else
git commit -m "docs: life latest" -a
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: test output
env:
AUGAGU: ${{steps.commit.outputs.has_changes}}
run: |
echo "=========="
echo "$GITHUB_OUTPUT"
echo "=========="
echo "${{steps.commit.outputs.has_changes}}"
echo "=========="
echo "$AUGAGU"
- name: Push changes
if: steps.commit.outputs.has_changes == 'true' && github.event_name != 'pull_request'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DEPLOY_GH }}
branch: ${{ github.head_ref }}
# - name: Create Pull Request
# if: ${{ steps.commit.outputs.has_changes == 'true' }}
# uses: peter-evans/create-pull-request@v6
# with:
# token: ${{ secrets.DEPLOY_GH }}
# title: "docs: life latest"
# commit-message: "docs: life latest"
# committer: GitHub <[email protected]>
# author: GitHub <[email protected]>
# branch: create-pull-request/patch-life-recent-update
# base: master
# labels: |
# report
# automated pr
# assignees: DrAugus
# # Review cannot be requested from pull request author.
# # reviewers: DrAugus