Skip to content

Commit

Permalink
documentation branch working
Browse files Browse the repository at this point in the history
  • Loading branch information
zain-sohail committed Oct 11, 2023
1 parent 05dffa8 commit e5f87c1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cache_setup.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 #
#------------------------#
28 changes: 19 additions & 9 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit e5f87c1

Please sign in to comment.