image classify #1
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: image classify | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 11 * * *' | |
env: | |
GIT_USER: xiaolin2004 # change to yourself | |
GIT_EMAIL: [email protected] # change to yourself | |
THEME_REPO: lfkdsk/hexo-theme-type | |
THEME_BRANCH: main | |
TEMPLATE_REPO: lfkdsk/album_template | |
TEMPLATE_BRANCE: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: secrets | |
steps: | |
- name: Checkout template repo | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ env.TEMPLATE_REPO }} | |
ref: ${{ env.TEMPLATE_BRANCE }} | |
- name: Checkout public repo | |
uses: actions/checkout@v2 | |
continue-on-error: true # allow error. | |
with: | |
ref: gh-pages | |
path: public | |
- name: Checkout gallery repo | |
uses: actions/checkout@v2 | |
continue-on-error: true # allow error. | |
with: | |
path: gallery | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- run: pip install -r requires_tf.txt | |
continue-on-error: true | |
- run: python analysis.py | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./public | |
github_token: ${{ secrets.GH_PAGES_DEPLOY }} | |
user_name: ${{ env.GIT_USER }} | |
user_email: ${{ env.GIT_EMAIL }} | |
commit_msg: ${{ github.event.head_commit.message }} |