Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahmoudgalalz/surge-action
Github action to autodeploy a client-side app to https://surge.sh
https://github.com/mahmoudgalalz/surge-action
automation cicd deployment github-actions ncc
Last synced: about 1 month ago
JSON representation
Github action to autodeploy a client-side app to https://surge.sh
- Host: GitHub
- URL: https://github.com/mahmoudgalalz/surge-action
- Owner: Mahmoudgalalz
- Created: 2023-07-03T22:00:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-06T22:11:22.000Z (over 1 year ago)
- Last Synced: 2024-12-04T11:05:34.423Z (about 1 month ago)
- Topics: automation, cicd, deployment, github-actions, ncc
- Language: JavaScript
- Homepage:
- Size: 1.02 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Surge Action
This action will auto deploy your client-side app like React, Preact, svelte, Astro and any html, js project
explore [surge](https://surge.sh) for more details## Inputs
### `domain`
**Required** the name of the sub domain on surge.sh. Default `random value`.
supporting for custom domains is coming soon
### `env token`
you have to use surge and have accountso you have to insall it
`npm i -g surge`
then `surge login` will let you create an account
then get your token `surge token`
```yaml
- 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
## Outputs
### `domain`
the domain name and details about your deployment.
## Example usage
```yaml
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 }}
```## contribution
feel free to send issue, or feature