Skip to content

Deploy MkDocs to Neocities #9

Deploy MkDocs to Neocities

Deploy MkDocs to Neocities #9

name: Deploy MkDocs to Neocities
on:
push:
branches:
- gh-pages
workflow_dispatch:
concurrency:
group: deploy-to-neocities
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Deploy to Neocities
uses: bcomnes/deploy-to-neocities@v3
with:
api_key: ${{ secrets.NEOCITIES_API_TOKEN }} # Neocities API token from GitHub secrets
dist_dir: . # Use the current directory since it contains the generated HTML
cleanup: true # Optional: Remove orphaned files on Neocities
preview_before_deploy: true # Optional: Show preview before deployment