From 0176bb28122f1cbd5e6dccf5b13a25c5ce521461 Mon Sep 17 00:00:00 2001 From: Minerva Enriquez <74386190+menriquez-IDM@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:06:32 -0700 Subject: [PATCH 1/3] Create preview_typhoid_docs.yml Initial draft: - build typhoid documents using the classic emodpy steps. - it uses the idm action. --- .github/workflow/preview_typhoid_docs.yml | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflow/preview_typhoid_docs.yml diff --git a/.github/workflow/preview_typhoid_docs.yml b/.github/workflow/preview_typhoid_docs.yml new file mode 100644 index 0000000..3e96da1 --- /dev/null +++ b/.github/workflow/preview_typhoid_docs.yml @@ -0,0 +1,58 @@ +# This workflow will rebuild emodpy-typhoid Docs triggered when changes to rst, python, or requirements.txt files occur. +# It uses the new IDMPublicActions/BuildTheDocs action which: +# - Build HTML (and it treats failures as warnings) and Text docs (which generates a downloable tar file) +# - It uploads the generated files to IDMs Azure blob container +# If the action is triggered from a PR then it appends a message with the resulting URL for the HTML build. + +name: Rebuild hiv Docs +on: + push: + paths: + - '**.py' + - '**.yml' + - '**/*docs/**' + - '**.txt' + pull_request: + branches: + - '*' + +jobs: + emodpy-typhoid-Docs-Preview: + runs-on: ubuntu-latest + steps: + - name: Repo Checkout + uses: actions/checkout@v2 + with: + ref: ${{github.event.inputs.branch}} + + # Environment Setup + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install emodpy-typhoid requirements + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple + pip install -e . --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple + pip install -r docs/requirements.txt --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple + + - name: Build using the new IDM Github Action + uses: IDMPublicActions/BuildTheDocs@v1.0.2 + with: + blob_endpoint: 'https://idmdocsstaging.z5.web.core.windows.net' + target_location: 'idm/${{ github.repository }}' + blob_container_name: '$web' + tar_file_name: 'emodpy-typhoid' + service_principal_credentials: ${{ secrets.BLOB_JSON_SERVICE_PRINCIPAL_CREDENTIALS }} + account_name: 'idmdocsstaging' + cdn_profile_name: 'idmdocs-cdn-webprofile' + cdn_endpoint_name: 'idmdocs-cdn-webendpoint' + resource_group: 'IDMDocsPreviewGroup' + pr_update_token: ${{ secrets.GITHUB_TOKEN }} + + - name: ALL YOUR LINKS + run: | + echo "${{ env.LINK_URL }}" + echo "${{ env.LINK_TO_TAR }}" From 8acf45b9ae39b4bbf46e4f357ace34fec816d40f Mon Sep 17 00:00:00 2001 From: Minerva Enriquez <74386190+menriquez-IDM@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:12:32 -0700 Subject: [PATCH 2/3] fixing workflows folder name --- .github/workflows/preview_typhoid_docs.yml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/preview_typhoid_docs.yml diff --git a/.github/workflows/preview_typhoid_docs.yml b/.github/workflows/preview_typhoid_docs.yml new file mode 100644 index 0000000..3e96da1 --- /dev/null +++ b/.github/workflows/preview_typhoid_docs.yml @@ -0,0 +1,58 @@ +# This workflow will rebuild emodpy-typhoid Docs triggered when changes to rst, python, or requirements.txt files occur. +# It uses the new IDMPublicActions/BuildTheDocs action which: +# - Build HTML (and it treats failures as warnings) and Text docs (which generates a downloable tar file) +# - It uploads the generated files to IDMs Azure blob container +# If the action is triggered from a PR then it appends a message with the resulting URL for the HTML build. + +name: Rebuild hiv Docs +on: + push: + paths: + - '**.py' + - '**.yml' + - '**/*docs/**' + - '**.txt' + pull_request: + branches: + - '*' + +jobs: + emodpy-typhoid-Docs-Preview: + runs-on: ubuntu-latest + steps: + - name: Repo Checkout + uses: actions/checkout@v2 + with: + ref: ${{github.event.inputs.branch}} + + # Environment Setup + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install emodpy-typhoid requirements + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple + pip install -e . --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple + pip install -r docs/requirements.txt --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple + + - name: Build using the new IDM Github Action + uses: IDMPublicActions/BuildTheDocs@v1.0.2 + with: + blob_endpoint: 'https://idmdocsstaging.z5.web.core.windows.net' + target_location: 'idm/${{ github.repository }}' + blob_container_name: '$web' + tar_file_name: 'emodpy-typhoid' + service_principal_credentials: ${{ secrets.BLOB_JSON_SERVICE_PRINCIPAL_CREDENTIALS }} + account_name: 'idmdocsstaging' + cdn_profile_name: 'idmdocs-cdn-webprofile' + cdn_endpoint_name: 'idmdocs-cdn-webendpoint' + resource_group: 'IDMDocsPreviewGroup' + pr_update_token: ${{ secrets.GITHUB_TOKEN }} + + - name: ALL YOUR LINKS + run: | + echo "${{ env.LINK_URL }}" + echo "${{ env.LINK_TO_TAR }}" From 894bb3b2cedae82cf01ac00641f2909da801256f Mon Sep 17 00:00:00 2001 From: Minerva Enriquez <74386190+menriquez-IDM@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:13:09 -0700 Subject: [PATCH 3/3] fixing workflows folder name --- .github/workflow/preview_typhoid_docs.yml | 58 ----------------------- 1 file changed, 58 deletions(-) delete mode 100644 .github/workflow/preview_typhoid_docs.yml diff --git a/.github/workflow/preview_typhoid_docs.yml b/.github/workflow/preview_typhoid_docs.yml deleted file mode 100644 index 3e96da1..0000000 --- a/.github/workflow/preview_typhoid_docs.yml +++ /dev/null @@ -1,58 +0,0 @@ -# This workflow will rebuild emodpy-typhoid Docs triggered when changes to rst, python, or requirements.txt files occur. -# It uses the new IDMPublicActions/BuildTheDocs action which: -# - Build HTML (and it treats failures as warnings) and Text docs (which generates a downloable tar file) -# - It uploads the generated files to IDMs Azure blob container -# If the action is triggered from a PR then it appends a message with the resulting URL for the HTML build. - -name: Rebuild hiv Docs -on: - push: - paths: - - '**.py' - - '**.yml' - - '**/*docs/**' - - '**.txt' - pull_request: - branches: - - '*' - -jobs: - emodpy-typhoid-Docs-Preview: - runs-on: ubuntu-latest - steps: - - name: Repo Checkout - uses: actions/checkout@v2 - with: - ref: ${{github.event.inputs.branch}} - - # Environment Setup - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: Install emodpy-typhoid requirements - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple - pip install -e . --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple - pip install -r docs/requirements.txt --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple - - - name: Build using the new IDM Github Action - uses: IDMPublicActions/BuildTheDocs@v1.0.2 - with: - blob_endpoint: 'https://idmdocsstaging.z5.web.core.windows.net' - target_location: 'idm/${{ github.repository }}' - blob_container_name: '$web' - tar_file_name: 'emodpy-typhoid' - service_principal_credentials: ${{ secrets.BLOB_JSON_SERVICE_PRINCIPAL_CREDENTIALS }} - account_name: 'idmdocsstaging' - cdn_profile_name: 'idmdocs-cdn-webprofile' - cdn_endpoint_name: 'idmdocs-cdn-webendpoint' - resource_group: 'IDMDocsPreviewGroup' - pr_update_token: ${{ secrets.GITHUB_TOKEN }} - - - name: ALL YOUR LINKS - run: | - echo "${{ env.LINK_URL }}" - echo "${{ env.LINK_TO_TAR }}"