File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,19 +2,16 @@ name: Build Docs
22on :
33 schedule :
44 - cron : ' 0 7 * * *' # UTC time
5- workflow_dispatch :
5+ repository_dispatch :
6+ types : [build-docs]
67jobs :
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 :
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"
You can’t perform that action at this time.
0 commit comments