-
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@61815dcd50bd041e203e49132bacad1fd04d2708 #v5.1.1
with:
role-to-assume: ${{ secrets.CI_MAIN_TESTING_ACCOUNT_ROLE_ARN }}
aws-region: us-west-2
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
fetch-depth: '0'
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 #v6.1.0
with:
python-version: 3.x
- name: Setup .NET 10
uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 #v5.1.0
with:
dotnet-version: 10.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