-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.09 KB
/
ci.yml
File metadata and controls
40 lines (38 loc) · 1.09 KB
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
name: Build
on:
push:
branches: [live]
pull_request:
branches: [live]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: set version number
run: |
$version = Get-Date -Format "yyyyMMdd"
$runid = "${env:GITHUB_RUN_NUMBER}"
$content = Get-Content "./theme/partials/head.tmpl.partial"
$newContent = $content -replace "\[APPID\]", "${{ secrets.APPID }}"
$newContent2 = $newContent -replace "\[BuildNumber\]", "$version.$runid"
Set-Content "./theme/partials/head.tmpl.partial" -Value $newContent2
shell: pwsh
- name: choco install docfx
run: |
choco install docfx -y
env:
CI: true
- name: build documentation
run: |
docfx build
- name: commit to gh-pages
uses: crazy-max/ghaction-github-pages@v2.1.1
with:
target_branch: gh-pages
allow_empty_commit: |
false
build_dir: |
docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}