-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.12 KB
/
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
43
44
45
name: Deploy to Server
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- run: corepack enable
# Pick your own package manager and build script
- run: pnpm install
- run: pnpm exec nuxi build --preset node-server
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: node
path: ./.output/
include-hidden-files: true
if-no-files-found: error
# Deployment job
deploy:
# Add a dependency to the build job
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy using SSH to Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
script: |
cd campu
bash deploy.sh