-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.03 KB
/
main.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: Build & Push documentation
# build only on push to master branch
on:
push:
branches:
- develop
jobs:
job1:
name: Build & Push documentation
runs-on: ubuntu-20.04
outputs:
git-tag: ${{ steps.previoustag.outputs.tag }}
steps:
-
name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: 'Get Previous Tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@master"
-
name: 'Git Tag'
run: echo ${{steps.previoustag.outputs.tag}}
# Build prod
-
name: 'build prod'
run: |
npm install
npm run build
# Sync files
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.0.0
with:
server: ftp.canarytrace.com
username: ${{ secrets.FTP_USER_PIPELINE }}
password: ${{ secrets.FTP_PASS }}
local-dir: './build/'
server-dir: '/public_html/v2doc/'