This action will auto deploy your client-side app like React, Preact, svelte, Astro and any html, js project explore surge for more details
Required the name of the sub domain on surge.sh. Default random value
.
supporting for custom domains is coming soon
you have to use surge and have account
so you have to insall it
npm i -g surge
then surge login
will let you create an account
then get your token surge token
- name: deploying to surge
uses: mahmoudgalalz/[email protected] # for spcific release take a look at the release tags
with:
domain: 'action_with_surge.surge.sh' # you should spcifiy a domain that no one has it to avoid errors
path: './dist' # this is the deafult value you can use what your build tool suggest
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
Required the SURGE_TOKEN is used to authenticate on your behalf.
supporting for custom domains is coming soon
the domain name and details about your deployment.
on:
push:
branches: [ main ]
jobs:
build_and_deploy:
runs-on: ubuntu-latest
name: Build the code
steps:
- name: checkout the project
uses: actions/checkout@v3
- name: install deps
uses: actions/setup-node@v3
with:
node-version: v16.x
- name: build the project
run: |
npm install -g pnpm
pnpm i
npm run build
- name: deploying to surge
uses: mahmoudgalalz/[email protected]
with:
domain: 'action_with_surge.surge.sh'
path: './dist'
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
feel free to send issue, or feature