-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1007 Bytes
/
deploy.yml
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
40
41
42
name: Deploy
on:
push:
branches:
- master
jobs:
deploy_to_dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install dependencies
run: |
npm install -g pnpm
pnpm init-project
- name: Lint
run: pnpm run lint
- name: Build
run: pnpm build
# SSH Deployment Steps
- name: Set up SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Execute Remote Commands
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@${{ secrets.HOST }} << EOF
cd plugin/figma-plugin-sample
git fetch --all
git checkout master
git pull origin master
git reset --hard origin/master
docker compose up --build
EOF