Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsuttlemyre authored May 29, 2024
1 parent 79f0977 commit 5102a35
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ on:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
ENVIRONMENT: ktsuttle-dev
CNAME: watermelontest.surge.sh
# create a place to store your env.vars and secret.vars via https://github.com/ktsuttlemyre/kqDraft/settings/environments
GH_ENVIRONMENT: ktsuttle-dev
# Set it to the email address you use with Surge
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
# SURGE_TOKEN: Set it to your login token (get it by doing a surge token)
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}

jobs:
Deploy-to-Surge:
name: Deploy
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
environment:
name: ${ENVIRONMENT}
url: ${CNAME}
name: ${GH_ENVIRONMENT}
url: ${env.CNAME}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -29,4 +31,4 @@ jobs:
- run: |
if [[ -z "${SURGE_LOGIN}" ]] || [[ -z "${SURGE_TOKEN}" ]]; then echo "Make sure SURGE_TOKEN and SURGE_LOGIN are set" ; exit 1; fi
npm install --global surge
surge . $CNAME
surge . ${{ env.CNAME }}

0 comments on commit 5102a35

Please sign in to comment.