Skip to content

Generate Docs

Generate Docs #23

Workflow file for this run

name: Generate Docs
on:
schedule:
- cron: '0 9 * * SUN'
workflow_dispatch:
inputs:
types_az_ref:
description: 'Git ref or full SHA for https://github.com/Azure/bicep-types-az.'
required: true
default: autogenerate
jobs:
generate:
name: Generate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
submodules: true
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Clone bicep-types-az
uses: actions/checkout@v4
with:
repository: Azure/bicep-types-az
path: workflow-temp/bicep-types-az
ref: ${{ github.event.inputs.types_az_ref || 'autogenerate' }}
- id: get_types_az_gh_uri
name: Get GitHub URI for bicep-types-az
run: |
git_sha=`git rev-parse --short HEAD`
echo "gh_uri=https://github.com/Azure/bicep-types-az/tree/$git_sha" >> $GITHUB_OUTPUT
working-directory: workflow-temp/bicep-types-az
- name: Run Generation
run: |
mkdir -p "$RUNNER_TEMP/generated"
dotnet run --configuration Release --project ./src/TemplateRefGenerator \
--source-folder workflow-temp/bicep-types-az/generated \
--output-folder "$RUNNER_TEMP/generated" \
--verbose
- name: Upload Generated
uses: actions/upload-artifact@v4
with:
name: generated
path: ${{ runner.temp }}/generated
- name: Job Summary
run: |
echo "Generated docs from ${{ steps.get_types_az_gh_uri.outputs.gh_uri }}" >> $GITHUB_STEP_SUMMARY