Skip to content

Commit 158251d

Browse files
committed
add git ci for prod
1 parent a0aca9f commit 158251d

File tree

3 files changed

+46
-34
lines changed

3 files changed

+46
-34
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: Deploy to KeyCDN
6+
jobs:
7+
build:
8+
name: Build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Get Version
15+
id: get-version
16+
uses: beaconbrigade/package-json-version@v0.3.2
17+
with:
18+
path: .
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
- name: Build
24+
run: npm run build
25+
26+
- name: Push files to Current folder
27+
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
28+
with:
29+
server: ftp.keycdn.com
30+
username: metro4
31+
password: ${{ secrets.FTP_PASSWORD_KEYCDN }}
32+
dangerous-clean-slate: true
33+
local-dir: ./lib/
34+
server-dir: current/
35+
36+
- name: Push files to Number folder
37+
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
38+
with:
39+
server: ftp.keycdn.com
40+
username: metro4
41+
password: ${{ secrets.FTP_PASSWORD_KEYCDN }}
42+
dangerous-clean-slate: true
43+
local-dir: ./lib/
44+
server-dir: ${{ steps.get-version.outputs.version }}/

deploy-dev.js

-31
This file was deleted.

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@
3434
"build": "npm run clean && cross-env NODE_NO_WARNINGS=1 MODE=production node build.js",
3535
"dev": "npm run clean && cross-env NODE_NO_WARNINGS=1 MODE=development node build.js",
3636
"watch": "npm run clean && cross-env NODE_NO_WARNINGS=1 MODE=development node watch.js",
37-
"dep:prod": "npm run build && node ./deploy.js",
38-
"dep": "npm run dev && node ./deploy-dev.js",
37+
"dep": "npm run build && node ./deploy.js",
3938
"pub": "npm publish --access public",
40-
"test": "easytest --include='__tests__/*.test.js' --skip='gravatar,touch,sidebar,list.html,audio-player'",
39+
"test": "easytest --include='__tests__/*.test.js'",
4140
"check": "npx biome check"
4241
},
4342
"browserslist": ["last 2 versions"],

0 commit comments

Comments
 (0)