-
Notifications
You must be signed in to change notification settings - Fork 1.8k
39 lines (34 loc) · 891 Bytes
/
deploy.yml
File metadata and controls
39 lines (34 loc) · 891 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
33
34
35
36
37
38
39
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Connect to Tailscale
uses: tailscale/github-action@v4
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
hostname: deploy-hey-xyz-${{ github.run_id }}
ping: hey-xyz
version: latest
- name: Deploy
run: |
tailscale ssh root@hey-xyz "\
cd hey.xyz && \
git pull --ff-only && \
pnpm install --frozen-lockfile && \
pnpm build && \
pm2 restart hey.xyz --update-env \
"