Deploy MkDocs to Neocities #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |