-
Notifications
You must be signed in to change notification settings - Fork 31
60 lines (57 loc) · 2.11 KB
/
doc-builder.yml
File metadata and controls
60 lines (57 loc) · 2.11 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
# Allow the workflow to be triggered also manually.
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df #v4.2.1
with:
role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }}
aws-region: us-west-2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
fetch-depth: '0'
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5.6.0
with:
python-version: 3.x
- name: Setup .NET 8
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 #v4.3.1
with:
dotnet-version: 8.0.x
- run: pip install mkdocs-material==8.2.9
- run: pip install mkdocs-awesome-pages-plugin==2.8.0
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Run Client Generator
run: |
cd ./src/AWS.Deploy.DocGenerator
dotnet run --project ./AWS.Deploy.DocGenerator.csproj
- name: Check For Git Untracked Changes
id: gitcheck
shell: pwsh
run: |
$newFiles=$(git ls-files --others --exclude-standard | wc -l)
$modifiedFiles=$(git diff --name-only | wc -l)
"newFiles=$newFiles" >> $env:GITHUB_OUTPUT
"modifiedFiles=$modifiedFiles" >> $env:GITHUB_OUTPUT
- name: Commit and Push next version
if: steps.gitcheck.outputs.newFiles != 0 || steps.gitcheck.outputs.modifiedFiles != 0
id: commit-push
run: |
git config --global user.email "github-aws-sdk-dotnet-automation@amazon.com"
git config --global user.name "aws-sdk-dotnet-automation"
git add site/
git commit -m "Update documentation generated by AWS.Deploy.DocGenerator"
git push
- run: mkdocs gh-deploy --force