Skip to content

Commit c29d13c

Browse files
committed
chore: disable the workflow_dispatch
1 parent 852735e commit c29d13c

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/build-docs.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@ name: Build Docs
22
on:
33
schedule:
44
- cron: '0 7 * * *' # UTC time
5-
workflow_dispatch:
5+
repository_dispatch:
6+
types: [build-docs]
67
jobs:
7-
tag:
8+
build-and-deploy-docs:
89
name: Build and deploy docs
910
runs-on: [self-hosted, blackwell]
10-
if: github.repository == 'nunchaku-tech/nunchaku'
11+
if: github.repository == 'nunchaku-tech/nunchaku' && (github.event_name != 'repository_dispatch' || github.actor == 'lmxyy')
12+
env:
13+
DOC_VERSION: ${{ github.event.client_payload.version || 'nightly' }}
1114
steps:
12-
- name: Test ssh
13-
run: |
14-
echo "${{ secrets.DO_SSH_KEY }}" > ./id_rsa
15-
chmod 600 id_rsa
16-
ssh -o StrictHostKeyChecking=no -i id_rsa ${{ secrets.DO_USER }}@${{ secrets.DO_HOST }} "echo SSH connection successful"
17-
rm id_rsa
1815
- name: Checkout main branch
1916
uses: actions/checkout@v4
2017
with:
@@ -59,7 +56,7 @@ jobs:
5956
source $(conda info --base)/etc/profile.d/conda.sh
6057
conda activate nunchaku-docs || { echo "Failed to activate conda env"; exit 1; }
6158
which python
62-
rsync -avz --delete docs/build/html/ ${{ secrets.DO_USER }}@${{ secrets.DO_HOST }}:${{ secrets.DO_DOCS_ROOT }}/nunchaku-nightly
59+
rsync -avz --delete docs/build/html/ ${{ secrets.DO_USER }}@${{ secrets.DO_HOST }}:${{ secrets.DO_DOCS_ROOT }}/nunchaku-${{ env.DOC_VERSION }}
6360
rm id_rsa
6461
env:
6562
RSYNC_RSH: "ssh -o StrictHostKeyChecking=no -i id_rsa"

0 commit comments

Comments
 (0)