Skip to content

Instantly share code, notes, and snippets.

@rich-97
Created April 29, 2021 13:27
Show Gist options
  • Save rich-97/3ed8fde5ff4a9f9643537a0be59e1317 to your computer and use it in GitHub Desktop.
Save rich-97/3ed8fde5ff4a9f9643537a0be59e1317 to your computer and use it in GitHub Desktop.
Gh Action for Next.js App Deploy to surge
name: Deploy To Surge
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install surge and fire deployment
uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm run eslint
- run: npm run prettier
- run: npm run test
- run: npm run build
- run: npm run export
- run: npm install -g surge
- run: surge ./out domain.surge.sh --token {{TOKEN}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment