Skip to content

Host a staging instance of Surge #38

Host a staging instance of Surge

Host a staging instance of Surge #38

Workflow file for this run

name: Host a staging instance of Surge
on:
push:
branches:
- main
workflow_dispatch:
jobs:
staging:
name: Build and deploy to staging
runs-on: self-hosted
steps:
- name: Pull latest code and deploy with Docker
run: |
cd /home/ubuntu/clones/surge-staging
export GIT_SSH_COMMAND="ssh -i /home/ubuntu/.ssh/gh-actions -o IdentitiesOnly=yes"
git fetch origin
git checkout ${{ github.ref_name }}
git reset --hard origin/${{ github.ref_name }}
docker compose --profile prod down
docker compose --profile prod up --build -d