switch ssh-deploy action to main branch #17
This file contains 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: | |
paths: ['docs/**', '.github/workflows/docs.yml'] | |
pull_request: | |
paths: ['docs/**', '.github/workflows/docs.yml'] | |
permissions: | |
contents: read | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: pip install -r docs/requirements.txt | |
- name: Build docs | |
run: | | |
cd docs | |
sphinx-build -b html -n -W --keep-going -j auto . _build | |
- name: Upload docs | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.DOCS_KEY }} | |
ARGS: '-rzvc' | |
SOURCE: 'docs/_build/' | |
REMOTE_HOST: ${{ secrets.DOCS_HOST }} | |
REMOTE_USER: ${{ secrets.DOCS_USER }} | |
TARGET: '_build/docs/' | |
SCRIPT_BEFORE: mkdir -p _build | |
SCRIPT_AFTER: ./initdocs.sh && echo $RSYNC_STDOUT |