Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsuttlemyre authored May 29, 2024
1 parent 1c67b91 commit 516a795
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#original https://www.programonaut.com/how-to-deploy-a-git-repository-to-a-server-using-github-actions/
name: Deploy to surge.sh
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
workflow_dispatch:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
ENVIRONMENT: dev

jobs:
Deploy-to-Surge:
name: Deploy to surge.sh
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
env:
CNAME: kqdraft.tildestar.com
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: |
npm install --global surge
surge . $ENVIRONMENT-$CNAME

0 comments on commit 516a795

Please sign in to comment.