Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yavisht/deploy-via-surge.sh-github-action-template
A simple Github Actions template to deploy your static site using surge.sh
https://github.com/yavisht/deploy-via-surge.sh-github-action-template
deployment devops frontend github-actions javascript static-site surge surge-sh
Last synced: 2 days ago
JSON representation
A simple Github Actions template to deploy your static site using surge.sh
- Host: GitHub
- URL: https://github.com/yavisht/deploy-via-surge.sh-github-action-template
- Owner: yavisht
- License: mit
- Created: 2019-10-04T14:55:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T01:33:48.000Z (about 1 year ago)
- Last Synced: 2024-08-02T07:22:33.413Z (3 months ago)
- Topics: deployment, devops, frontend, github-actions, javascript, static-site, surge, surge-sh
- Language: HTML
- Homepage: https://test-github-action-surge.surge.sh
- Size: 12.7 KB
- Stars: 80
- Watchers: 1
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Deploy a static site to Surge.sh
- fucking-awesome-actions - Deploy a static site to Surge.sh
- awesome-workflows - Deploy a static site to Surge.sh
README
# 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/](https://test-github-action-surge.surge.sh/)
**Step 1** Get a Deployment Token
![get-surge-token](https://user-images.githubusercontent.com/6112201/66218600-d8892080-e70c-11e9-8843-c2c29b4e7e9a.gif)**Step 2** Setup 2 secrets in your repository secrets tab
SURGE_TOKEN -> Your Surge Token
123abc123abc123abcSURGE_DOMAIN -> The domain you want to publish your site on
https://test-github-action-surge.surge.sh**Step 3**
Add the a new Github Action in .github/workflows folder in your repo```
name: Deploy Websiteon: [push]
jobs:
build:
runs-on: ubuntu-latest
name: Deploying to surge
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g surge
- run: surge ./ ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}```
**Step 4**
Test it with a commit