"vscode:/vscode.git/clone" did not exist on "4ba815b84e176033f37ea4e6b0311edd9066e946"
Unverified Commit 852735ec authored by Muyang Li's avatar Muyang Li Committed by GitHub
Browse files

chore: fix the build-docs workflow (#556)

* debugging the workflow

* debugging the workflow

* debug workflow

* debug workflow

* fix the rsa keys

* style: make linter happy
parent ae2a1d72
......@@ -5,10 +5,16 @@ on:
workflow_dispatch:
jobs:
tag:
name: Check if main branch is a dev version
name: Build and deploy docs
runs-on: [self-hosted, blackwell]
if: github.repository == 'nunchaku-tech/nunchaku'
steps:
- name: Test ssh
run: |
echo "${{ secrets.DO_SSH_KEY }}" > ./id_rsa
chmod 600 id_rsa
ssh -o StrictHostKeyChecking=no -i id_rsa ${{ secrets.DO_USER }}@${{ secrets.DO_HOST }} "echo SSH connection successful"
rm id_rsa
- name: Checkout main branch
uses: actions/checkout@v4
with:
......@@ -48,14 +54,12 @@ jobs:
make html
- name: Deploy docs
run: |
echo "${{ secrets.DO_SSH_KEY }}" > ./id_rsa
chmod 600 id_rsa
source $(conda info --base)/etc/profile.d/conda.sh
conda activate nunchaku-docs || { echo "Failed to activate conda env"; exit 1; }
which python
rsync -avz --delete docs/build/html/ ${{ secrets.DO_USER }}@${{ secrets.DO_HOST }}:${{ secrets.DO_DOCS_ROOT }}/nunchaku-nightly
rm id_rsa
env:
RSYNC_RSH: "ssh -o StrictHostKeyChecking=no -i ${{ secrets.DO_SSH_KEY }}"
- name: Clean up
if: always() && github.repository == 'nunchaku-tech/nunchaku'
run: |
cd ..
rm -r nunchaku
RSYNC_RSH: "ssh -o StrictHostKeyChecking=no -i id_rsa"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment