fix(docs): fix docs build (#32) #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy_docs: | |
name: Deploy Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install deps | |
run: npm ci | |
env: | |
CI: true | |
- name: Generate Docs | |
run: npm run docs | |
env: | |
CI: true | |
- name: Set up SSH | |
uses: webfactory/ssh-agent@v0.5.3 | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- name: Deploy code to server | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} 'rm -rf ${{ secrets.SSH_REMOTE_PATH }} && mkdir -p ${{ secrets.SSH_REMOTE_PATH }}' | |
scp -o StrictHostKeyChecking=no -r ./docs/* ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_REMOTE_PATH }} |