Skip to content

yavisht/deploy-via-surge.sh-github-action-template

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Deploy your static website to surge via Github Actions!

A simple Github Actions template to deploy your static site using surge.sh

Demo -> https://test-github-action-surge.surge.sh/

Step 1 Get a Deployment Token get-surge-token

Step 2 Setup 2 secrets in your repository secrets tab

SURGE_TOKEN -> Your Surge Token 123abc123abc123abc

SURGE_DOMAIN -> The domain you want to publish your site on https://your-surge-website-or-custom-domain.surge.sh

Screen Shot 2019-10-06 at 10 41 48 am

Step 3 Add the a new Github Action in .github/workflows folder in your repo

name: Deploy Website

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    name: Deploying to surge
    steps:
      - uses: actions/checkout@v1
      - name: Install surge and fire deployment
        uses: actions/setup-node@v1
        with:
          node-version: 8
      - run: npm install -g surge
      - run: surge ./ ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}

Step 4 Test it with a commit Screen Shot 2019-10-05 at 1 05 34 am

About

A simple Github Actions template to deploy your static site using surge.sh

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages