Skip to content

Update main.yml

Update main.yml #10

Workflow file for this run

#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
CNAME: watermelontest.surge.sh
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
jobs:
Deploy-to-Surge:
name: Deploy
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: |
echo "SURGE_LOGIN length: ${#SURGE_LOGIN}"
echo "CNAME length: ${CNAME}"
npm install --global surge
surge . $CNAME