-
Notifications
You must be signed in to change notification settings - Fork 1.6k
58 lines (53 loc) · 1.65 KB
/
deploy.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: Documentation Website Deployment
on:
push:
branches:
- master
paths:
- '.github/workflows/deploy.yml'
- 'src/**'
- 'website/**'
- 'plugin-examples/src/**'
jobs:
deploy:
runs-on: ubuntu-22.04
if: ${{ github.ref == 'refs/heads/master' }}
permissions:
contents: write
pages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install library dependencies
run: npm install
- name: Build library
run: npm run build:prod
- name: Install website dependencies
working-directory: ./website
run: npm install
- name: Build documentation website
working-directory: ./website
run: npm run build
- name: Install plugin example dependencies
working-directory: ./plugin-examples
run: npm install
- name: Build plugin examples website
working-directory: ./plugin-examples
run: npm run build:examples:site
- name: Build plugin examples website
working-directory: ./plugin-examples
run: npm run build:examples:site
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
user_name: 'TradingView'
user_email: 'noreply@tradingview.com'
commit_message: '[skip ci] Deploy website on ${{ github.event.head_commit.id }}'