Skip to content

deploy-event

deploy-event #175

Workflow file for this run

name: Deploy Blog
on:
# push:
# branches:
# - main
# schedule:
# - cron: "0 1 * * 2,5"
repository_dispatch:
types: [deploy-event]
jobs:
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.x
DOCS_PATH: blog
steps:
- uses: actions/checkout@v4
- name: Checkout blog
uses: actions/checkout@v4
with:
repository: qundao/void-blog
token: ${{ secrets.GH_TOKEN }}
path: ${{ env.DOCS_PATH }}
fetch-depth: 1
# ref: ${{ github.ref }}
# submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build sites
run: cd ${{ env.DOCS_PATH }} && bash ./deploy-all.sh
- name: Setup pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.DOCS_PATH }}/site
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@v4