Skip to content

Commit 04b20ec

Browse files
authored
Create CI-CD-Docs.yml
1 parent 0d755a3 commit 04b20ec

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/CI-CD-Docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'docs/**'
9+
- '.github/**'
10+
11+
env:
12+
VERSION: '0.0.0'
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
persist-credentials: false
21+
- name: Get current version
22+
id: currentVersion
23+
uses: "WyriHaximus/github-action-get-previous-tag@master"
24+
env:
25+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
26+
- name: Set version env
27+
run: echo "::set-env name=VERSION::${steps.currentVersion.outputs.tag\/v/}"
28+
- name: Update tokens in project files
29+
uses: cschleiden/replace-tokens@v1
30+
with:
31+
files: '["*.md", "**/*.md"]'
32+
- uses: actions/setup-dotnet@v1
33+
with:
34+
dotnet-version: '3.1.101'
35+
- name: Build docs
36+
run: dotnet build docs/
37+
- name: Deploy
38+
uses: JamesIves/github-pages-deploy-action@releases/v3
39+
with:
40+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
41+
BRANCH: gh-pages # The branch the action should deploy to.
42+
FOLDER: docs/_site # The folder the action should deploy.

0 commit comments

Comments
 (0)