Merge pull request #53 from msk-access/release/0.2.7 #210
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] | |
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 | |
with: | |
fetch-depth: 0 | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
# 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: | | |
git checkout ${{ steps.extract_branch.outputs.branch }} | |
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: Write Docs | |
id: write_docs | |
run: | | |
git checkout docs -- | |
git checkout ${{ steps.extract_branch.outputs.branch }} -- README.md | |
git checkout ${{ steps.extract_branch.outputs.branch }} -- docs/cli.md | |
mv docs/cli.md cli.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' |