From e5f87c1ee78589cd60f317ca2582bc3fac5f0118 Mon Sep 17 00:00:00 2001 From: "M. Zain Sohail" Date: Wed, 11 Oct 2023 03:20:29 +0200 Subject: [PATCH] documentation branch working --- .github/workflows/cache_setup.yml | 11 ++++++++--- .github/workflows/documentation.yml | 28 +++++++++++++++++++--------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cache_setup.yml b/.github/workflows/cache_setup.yml index f24e6da0..52a71685 100644 --- a/.github/workflows/cache_setup.yml +++ b/.github/workflows/cache_setup.yml @@ -1,8 +1,8 @@ -name: cache +name: test on: - # Triggers the workflow on push but only for the main branch - workflow_call: + push: + branches: [ workflow_trials ] jobs: cache: @@ -13,8 +13,13 @@ jobs: #-------------------------------------# - name: Check out the repository uses: actions/checkout@v4 + - name: "Setup Python, Poetry and Dependencies" uses: packetcoders/action-setup-cache-python-poetry@main with: python-version: 3.8 poetry-version: 1.2.2 + + #------------------------# + # Run your actual job # + #------------------------# diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index c579e511..994c4159 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -6,16 +6,26 @@ on: branches: [ workflow_trials ] jobs: - call-cache: - uses: ./.github/workflows/cache_setup.yml - documentation: + cache: runs-on: ubuntu-latest steps: + # Check out repo and set up Python + - name: Check out the repository + uses: actions/checkout@v4 + + - name: "Setup Python, Poetry and Dependencies" + uses: packetcoders/action-setup-cache-python-poetry@main + with: + python-version: 3.8 + poetry-version: 1.2.2 + + # Generates and commits a requirements.txt used by readthedocs - name: Export requirements.txt run: poetry export --without-hashes --format=requirements.txt -o docs/requirements.txt -E docs -E notebook - # - name: Commit changes - # uses: EndBug/add-and-commit@v9 - # with: - # default_author: github_actions - # message: 'Updating requirements for docs' - # add: 'docs/requirements.txt' + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: 'Updating requirements for docs' + add: 'docs/requirements.txt'