Add deploy action
Some checks failed
Build and Deploy MkDocs / build-deploy (push) Failing after 2m18s

This commit is contained in:
Skylar Ittner 2026-02-13 13:10:48 -07:00
parent 2aa4cef22d
commit 3df246d815

View File

@ -0,0 +1,45 @@
name: Build and Deploy MkDocs
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install MkDocs
run: |
pip install --upgrade pip
pip install mkdocs mkdocs-material pymdown-extensions mkdocs-material-extensions
- name: Build site
run: mkdocs build --clean
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p ${{
secrets.DEPLOY_PORT || 22
}} ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync
run: |
rsync -avz --delete \
--filter='P error/' \
--filter='P stats/' \
-e "ssh -p ${{ secrets.DEPLOY_PORT || 22 }}" \
site/ \
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/var/www/dev.postalpoint.app/web