Skip to content

Instantly share code, notes, and snippets.

@peterbinks
Created November 27, 2025 21:03
Show Gist options
  • Select an option

  • Save peterbinks/784a6135d425ad0cb6d80c86fb849d78 to your computer and use it in GitHub Desktop.

Select an option

Save peterbinks/784a6135d425ad0cb6d80c86fb849d78 to your computer and use it in GitHub Desktop.
Desploy Static Site to NearlyFreeSpeech Hosting
name: NFSN Deploy
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
- name: Setup npm
run: |
npm install npm@11
npm --version
- name: NPM Install
run: npm install
- name: Build
run: npm run build
- name: Deploy
run: >
sshpass -p "${{ secrets.NFSN_PASSWORD }}" rsync -avz -e "ssh -o StrictHostKeyChecking=no" --delete dist/ "${{ secrets.NFSN_USERNAME }}"@"${{ secrets.NFSN_HOSTNAME }}":/home/public
@peterbinks
Copy link
Copy Markdown
Author

This is specifically for an Astro site, but should work for any statically generated site (or SPA?) site.

Add the following secrets to your GH Repo:

NFSN_PASSWORD - your member pw
NFSN_USERNAME - username for SSH
NFSN_HOSTNAME - your hostname

This will deploy to static type hosting at nearly free speech - the ssh path might need to be changed for other types of hosting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment