Skip to content

Instantly share code, notes, and snippets.

@tomchatting
Created March 24, 2023 12:06
Show Gist options
  • Save tomchatting/adf51dfed53a26daba7595a88469f97e to your computer and use it in GitHub Desktop.
Save tomchatting/adf51dfed53a26daba7595a88469f97e to your computer and use it in GitHub Desktop.
YML file that ties publishes to surge.sh on commit. Secrets SURGE_DOMAIN and SURGE_TOKEN are required (to get the latter just do "surge token" in bash)
name: build+deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
name: Publish to Surge.sh
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g surge
- run: surge ./ ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment