-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (39 loc) · 1.25 KB
/
build-docs.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
name: Docs Build
on:
release:
types: [released]
env:
BuildNumber: "${{ github.run_number }}"
jobs:
build-api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Doc generation
run: dotnet run --project ./tools/EdgeDB.DocGenerator/ -- $GITHUB_WORKSPACE
- name: Set git status Env
id: gh-status-check
run: |
echo "GITHUB_COMMIT_STATUS<<EOF" >> $GITHUB_ENV
git status >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Commit files
if: ${{ !contains(env.GITHUB_COMMIT_STATUS, 'nothing to commit') }}
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Generate docs" -a
- name: Push changes
if: ${{ !contains(env.GITHUB_COMMIT_STATUS, 'nothing to commit') }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}