-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (56 loc) · 1.46 KB
/
documentation.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
name: 📜 Test and deploy documentation
on:
pull_request:
branches: [main]
types: [review_requested, ready_for_review]
paths:
- 'website/**'
push:
branches: [main]
paths:
- 'website/**'
workflow_dispatch:
jobs:
test-build:
if: github.event_name != 'push'
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'website'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: './website/yarn.lock'
- name: Install dependencies
run: yarn install
- name: 🔨 Test build website
run: yarn build
deploy-website:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'website'
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: './website/yarn.lock'
- name: Install dependencies
run: yarn install
- name: 🔨 Build
run: yarn run build
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ftp.openpype.io
username: ${{ secrets.ftp_user }}
password: ${{ secrets.ftp_password }}
protocol: ftps
local-dir: ./website/build/