Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build & Deploy Rowan Python Docs

on:
release:
types: [published]

permissions:
contents: read

jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.9.1
with:
pixi-version: "latest"
activate-environment: true

- name: Build MkDocs site
run: pixi run mkdocs-build

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DOCS_SSH_KEY }}
known_hosts: "unnecessary"

- name: Add server to known_hosts
run: ssh-keyscan -H ${{ secrets.DOCS_IP }} >> ~/.ssh/known_hosts

- name: Deploy with rsync
run: |
rsync -avz --delete ./ \
${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_IP }}:{{ secrets.DOCS_TARGET_DIR }}