Skip to content

Commit f24cf39

Browse files
committed
ci(workflow): deploy job
1 parent 6f78ecd commit f24cf39

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: deploy
2+
on:
3+
push:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node-version: [20.14.0]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Install pnpm
14+
uses: pnpm/action-setup@v4
15+
with:
16+
version: 8.10.0
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: 'pnpm'
22+
- name: Install dependencies
23+
run: pnpm install
24+
- name: Build Website
25+
run: pnpm build
26+
- run: echo "build success!!"
27+
- run: echo "Install sshpass!"
28+
- run: apt-get update -y
29+
- run: apt-get -y install sshpass
30+
- run: echo "upload dist to service..."
31+
# - name: Upload Services
32+
# run: sshpass -p "$HOST_PASSWORD" scp -v -o "StrictHostKeyChecking no" -r ./.next/* ${{ vars.HOST_USER }}@${{ vars.HOST_IP }}:${{ vars.HOST_PUBLIC_PATH }}/
33+
# - name: Restart Services
34+
# run: sshpass -p "$HOST_PASSWORD" ssh ${{ vars.HOST_USER }}@${{ vars.HOST_IP }} -o "StrictHostKeyChecking no" "sh restart.sh"

0 commit comments

Comments
 (0)