Skip to content

Tasks

Tasks #2953

Workflow file for this run

name: "Generate docs/examples"
on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
# Regular (non-PR) checkout
- uses: actions/checkout@v4
if: ${{ github.event_name == 'push' }}
# Checkout PRs (including from forks) to allow committing doc changes
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: devenv
- run: nix profile install . -L --accept-flake-config
- name: Generate doc options
run: devenv shell devenv-generate-doc-options
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
add: docs/reference/options.md
message: 'Auto generate docs/reference/options.md'
- name: Verify individual docs
run: devenv shell devenv-verify-individual-docs
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'Auto generate missing individual markdowns'
- name: Generate docs and supported-languages example
run: |
devenv shell devenv-generate-docs
devenv shell devenv-generate-languages-example
devenv shell devenv-generate-individual-docs
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
add: docs examples/supported-languages/devenv.nix
message: 'Auto generate docs and examples'
- name: Generate JSON schema
run: devenv generate-json-schema
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
add: docs/devenv.schema.json
message: 'Auto generate docs/devenv.schema.json'