Automate release + conda build on version change in DESCRIPTION #846
This file contains hidden or 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: Update documentation | ||
| on: | ||
| pull_request_target: | ||
| paths-ignore: | ||
| - .github/* | ||
| - .gitignore | ||
| - README.md | ||
| jobs: | ||
| update_documentation: | ||
| # Only run on internal PRs (not forks) to prevent code injection via pull_request_target | ||
| if: github.event.pull_request.head.repo.full_name == github.repository | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout pull request branch | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| token: ${{ secrets.CI_TOKEN }} | ||
| fetch-depth: 0 | ||
| repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
| - name: Create TOML from recipe | ||
| run: .github/workflows/create_toml_from_yaml.sh ${GITHUB_WORKSPACE} | ||
| - name: Setup pixi | ||
| uses: prefix-dev/setup-pixi@v0.9.4 | ||
| with: | ||
| # cache: true # disabled — pixi.toml is dynamically generated, no lock file to cache from | ||
| - name: Generate documentation | ||
| run: pixi run devtools_document | ||
| - name: Commit changes to documentation | ||
| uses: EndBug/add-and-commit@v9 | ||
| with: | ||
| push: true | ||
| message: Update documentation | ||