Update document_package.yml #194
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: Document package | |
on: | |
push: | |
branches: [main, feature/update_docs] | |
jobs: | |
update_cli_doc: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" # install the python version needed | |
- name: Document CLI and write to folder | |
run: | | |
make deps-install | |
mkdir -p docs | |
poetry run typer postprocessing_variant_calls.main utils docs > docs/cli.md | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "add doc for cli" | |
add: '["docs/*.md --force"]' | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- uses: actions/checkout@v4 | |
with: | |
ref: docs | |
fetch-depth: 0 | |
- name: Write Docs | |
id: write_docs | |
run: | | |
git show ${{ steps.extract_branch.outputs.branch }} README.md > README.md | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "add doc for cli" | |
add: '["*.md --force"]' | |
push: 'origin docs --set-upstream --force' |