Skip to content

Generate Reference Pages #84

Generate Reference Pages

Generate Reference Pages #84

Workflow file for this run

name: Generate Reference Pages
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch:
permissions:
contents: write
id-token: write
jobs:
vpk-cli:
strategy:
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate CLI Reference
working-directory: generator
run: dotnet run -- cli refout
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: cli-${{ matrix.os }}
path: generator/refout/*
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate
working-directory: generator
run: dotnet run
- uses: caesay/wait-artifact-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_wait_seconds: 900
artifacts: cli-macos-latest,cli-windows-latest
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: docs/reference/cli/content
pattern: cli-*
merge-multiple: true
- name: Commit and Push
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
if git diff --staged --quiet; then
echo "No changes to commit."
else
echo "Changes detected. Committing..."
git commit -m "automatic update"
git push
fi