[FEAT] Conditionally link devenv profile #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Generate docs/examples" | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v23 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: devenv | |
- run: nix profile install . | |
- name: Generate doc options | |
run: devenv shell devenv-generate-doc-options | |
# https://github.com/NixOS/nixpkgs/issues/224661 | |
- run: sed -i 's/\\\././g' docs/reference/options.md | |
- uses: EndBug/add-and-commit@v9 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
default_author: github_actions | |
add: docs/reference/options.md | |
message: 'Auto generate docs/reference/options.md' | |
- name: Generate supported-languages example | |
run: devenv shell devenv-generate-languages-example | |
- name: Generate docs | |
run: devenv shell devenv-generate-docs | |
- uses: EndBug/add-and-commit@v9 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
default_author: github_actions | |
add: examples/supported-languages/devenv.nix | |
message: 'Auto generate examples/supported-languages/devenv.nix' |