-
Notifications
You must be signed in to change notification settings - Fork 11
33 lines (31 loc) · 870 Bytes
/
deploy.yml
File metadata and controls
33 lines (31 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: deploy
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
ship:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy over SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e
REPO_URL=${{ github.server_url }}/${{ github.repository }}.git
mkdir -p /opt/hyper-facilitator
cd /opt/hyper-facilitator
if [ ! -d .git ]; then
git clone "$REPO_URL" .
else
git fetch origin
fi
git checkout -f main
git reset --hard origin/main
cd Hyper-x402
cp .env.example .env || true
docker compose up -d