-
Notifications
You must be signed in to change notification settings - Fork 1.3k
67 lines (65 loc) · 1.76 KB
/
deploy-docs-and-dashboard.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
60
61
62
63
64
65
66
67
name: docs & dashboard-dist
on:
push:
branches:
- master
jobs:
changes:
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.filter.outputs.docs }}
dashboard: ${{ steps.filter.outputs.dashboard }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Check for changes 🎯
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
docs:
- 'docs/**'
dashboard:
- 'src/DotNetCore.CAP.Dashboard/wwwroot/src/**'
build-dashboard-and-push:
needs: changes
if: ${{ needs.changes.outputs.dashboard == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/DotNetCore.CAP.Dashboard/wwwroot
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js 🥽
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies 🧵
run: npm install
- name: Build to dist 🧨
run: npm run build
- name: Commit & Push dist changes 🚀
uses: actions-js/push@master
with:
branch: master
github_token: ${{ secrets.GITHUB_TOKEN }}
build-docs-and-deploy:
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Deploy docs 🚀
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
CONFIG_FILE: docs/mkdocs.yml