Skip to content

Commit

Permalink
Another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmfish authored Sep 6, 2024
1 parent 616ef36 commit aed5afa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/generate_readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install (without dependencies)
python -m pip install . --no-deps
- name: Get argparse help outputs
run: |
cd src/sim_recon/cli
export OTF_HELP_OUTPUT=$(python -c "import parsing; parsing.parse_otf_args(("--help",))")
export RECON_HELP_OUTPUT=$(python -c "import parsing; parsing.parse_recon_args(("--help",))")
export OTF_HELP_OUTPUT=$(python -c "from sim_recon.cli.parsing import parse_otf_args; parse_otf_args(("--help",))")
export RECON_HELP_OUTPUT=$(python -c "from sim_recon.cli.parsing import parse_recon_args; parse_recon_args(("--help",))")
- name: Get sections
run: |
cd docs
cd docs/
for file in sections/*; do
if [ -f "$file" ]; then
var_name="$(echo "${file^^}" | tr "./" "_")"
var_name="$(echo "${file^^}" | tr ./ _)"
echo "Saving $file to $var_name"
# Export file contents to an environment variable named from the path, e.g.:
# 'section/test_file.md' would be 'SECTION_TEST_FILE_MD'
export "${!var_name}"="$(<"$file")"
Expand Down

0 comments on commit aed5afa

Please sign in to comment.