Skip to content

guide-auto-sync

guide-auto-sync #8

name: guide-auto-sync
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
LARK_APP_ID: ${{ secrets.SYNC_GUIDE_LARK_APP_ID }}
LARK_APP_SECRET: ${{ secrets.SYNC_GUIDE_LARK_APP_SECRET }}
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: build pdf
run: python main.py
- name: build redirect page
run: cp resources/index.html out/index.html
- name: upload
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: out
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4