Skip to content

Commit

Permalink
Update check-and-ebook.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Apr 4, 2024
1 parent d0d52f0 commit 0bd3e9d
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/check-and-ebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,36 +41,22 @@ jobs:
path: hash-chapters.txt
key: chapter-hash-for-ebook-${{ steps.calculate-hash.outputs.hash }}

- name: check if hash has changed
id: check-hash
run: |
if [[ -z "${{ steps.cache.outputs.cache-hit }}" ]]; then
echo "Hash changed. Proceeding with the workflow."
else
echo "Hash unchanged. Exiting the workflow."
exit 0
fi
- name: python set up
if: steps.cache.outputs.cache-hit == 'false'
uses: actions/setup-python@v5
with:
python-version: "3.10"
# cache: "pip"

- name: python cache set up
if: steps.cache.outputs.cache-hit == 'false'
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: python-${{ env.pythonLocation }}

- name: check chapters for known issues
if: steps.cache.outputs.cache-hit == 'false'
run: python3 -O scripts/check_chapters.py

- name: check pre-commit hooks
if: steps.cache.outputs.cache-hit == 'false'
uses: pre-commit/action@v3.0.1

#
Expand All @@ -79,7 +65,9 @@ jobs:
make:
needs: check
# do not run make for pull_requests
if: github.event_name != 'pull_request'
# if: github.event_name != 'pull_request'
if: ${{ needs.check.outputs.cache-hit != 'true' }}

runs-on: ubuntu-22.04

steps:
Expand Down

0 comments on commit 0bd3e9d

Please sign in to comment.