Skip to content

Commit

Permalink
ci: added ssh deploy workflow (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxgic1337 authored Dec 31, 2024
1 parent 6bb6f92 commit 9176769
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Deploy
on:
push:
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Deploy
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-rlgoDzvc -i --delete"
SOURCE: "dist/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
EXCLUDE: "/dist/, /node_modules/"
12 changes: 10 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: Build check
on: [ push, pull_request ]
on:
push:
branches:
- '*'
- '*/*'
- '**'
- '!master'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,4 +27,4 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
run: pnpm run build

0 comments on commit 9176769

Please sign in to comment.