Skip to content

Commit 3ed493b

Browse files
committed
feat: add ci
1 parent db58490 commit 3ed493b

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: deploy
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
# Steps represent a sequence of tasks that will be executed as part of the job
20+
steps:
21+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 8
28+
29+
- name: install Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: '18'
33+
cache: 'pnpm'
34+
35+
- name: install deps
36+
run: pnpm install
37+
38+
- name: build app
39+
run: pnpm run build
40+
41+
- name: Deploy to the server.
42+
uses: cross-the-world/scp-pipeline@master
43+
with:
44+
host: ${{ secrets.REMOTE_HOST }}
45+
user: ${{ secrets.REMOTE_NAME }}
46+
pass: ${{ secrets.REMOTE_PASS }}
47+
connect_timeout: 10s
48+
local: 'dist/*'
49+
remote: ${{ secrets.REMOTE_TARGET }}

0 commit comments

Comments
 (0)