Skip to content

Merge pull request #100 from StarManTheGamer/poly-new #67

Merge pull request #100 from StarManTheGamer/poly-new

Merge pull request #100 from StarManTheGamer/poly-new #67

Workflow file for this run

name: Deploy
on:
push:
branches: main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ^3.12.3
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Configure SSH keys
run: |
mkdir -m 700 ~/.ssh
echo "${{ secrets.KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa -p ${{ secrets.PORT }} ${{ secrets.HOST }} > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
- name: Build for production
run: mkdocs build -s
- name: Sync to production
run: rsync -ae "ssh -p ${{ secrets.PORT }}" --zc zstd --zl 19 --delete site/ ${{ secrets.USER }}@${{ secrets.HOST }}:${{ secrets.DEST }}