Skip to content

Commit 183349d

Browse files
github actions
1 parent 83d948f commit 183349d

3 files changed

Lines changed: 69 additions & 1 deletion

File tree

.github/workflows/deploy-dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy DEV to host
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '>=18'
20+
21+
- name: Install dependencies
22+
run: yarn
23+
24+
- name: Build project
25+
run: yarn build-only
26+
27+
- name: FTP Deploy
28+
uses: pressidium/lftp-mirror-action@v1
29+
with:
30+
host: ${{ secrets.FTP_SERVER }}
31+
user: ${{ secrets.FTP_USERNAME }}
32+
pass: ${{ secrets.FTP_PASSWORD }}
33+
localDir: ./dist/
34+
remoteDir: ${{ secrets.FTP_DEMO_DEV_PATH }}

.github/workflows/deploy-prod.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy PROD to host
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '>=18'
20+
21+
- name: Install dependencies
22+
run: yarn
23+
24+
- name: Build project
25+
run: yarn build-only
26+
27+
- name: FTP Deploy
28+
uses: pressidium/lftp-mirror-action@v1
29+
with:
30+
host: ${{ secrets.FTP_SERVER }}
31+
user: ${{ secrets.FTP_USERNAME }}
32+
pass: ${{ secrets.FTP_PASSWORD }}
33+
localDir: ./dist/
34+
remoteDir: ${{ secrets.FTP_DEMO_PROD_PATH }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@jsonms/demo",
33
"private": true,
44
"type": "module",
5-
"version": "0.1.4",
5+
"version": "0.1.5",
66
"scripts": {
77
"dev": "vite",
88
"build": "run-p type-check \"build-only {@}\" --",

0 commit comments

Comments
 (0)