40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Publish and Deploy
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository_owner == 'jammyfu' }}
|
|
|
|
# 只在 pyproject.toml 文件发生更改时触发
|
|
# if: ${{ github.event_name == 'push' && contains(github.event.commits.*.modified, 'pyproject.toml') }}
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Publish Custom Node
|
|
uses: Comfy-Org/publish-node-action@main
|
|
with:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
|
|
|
deploy-pages:
|
|
name: Deploy GitHub Pages
|
|
runs-on: ubuntu-latest
|
|
|
|
# 只在 docs 文件夹发生更改时触发
|
|
if: ${{ github.event_name == 'push' && contains(github.event.commits.*.modified, 'docs') }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs
|