-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.45 KB
/
cd.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-deploy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
- name: Setup node env 🏗
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Cache node_modules 📦
uses: actions/cache@v2.1.6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies 👨🏻💻
run: npm ci --prefer-offline --no-audit
- name: Run linter 👀
run: npm run lint
- name: Generate 🚀
run: npm run generate
- name: Deploy to GitGub pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- name: Deploy to my web-server
uses: kevinpainchaud/simple-ftp-deploy-action@v1.2.1
with:
ftp_host: ${{ secrets.FTP_SERVER }}
ftp_username: ${{ secrets.FTP_USERNAME }}
ftp_password: ${{ secrets.FTP_PASSWORD }}
local_source_dir: "dist"
dist_target_dir: "/"
delete: "true"
exclude: "'^cdntx/' '^external/' '^projects/'"