Skip to content

Deploy mkdocs to test server #4

Deploy mkdocs to test server

Deploy mkdocs to test server #4

name: Deploy mkdocs to test server
on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r requirements.txt
- run: mkdocs build
- name: Copy folder content recursively to remote
uses: garygrossgarten/github-action-scp@release
with:
local: site
remote: /usr/www/html/
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
rmRemote: true
dotfiles: true