Skip to content

Commit

Permalink
Try update GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
janpipek committed Sep 14, 2024
1 parent 233488e commit dc322e2
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,20 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Poetry cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-cache-${{ runner.os }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Install dependencies
run: |
python -m pip install poetry
poetry install
python -m pip install uv
uv sync
- name: Compile the course
run: |
poetry run python -m naucse_render compile _compiled \
uv run python -m naucse_render compile _compiled \
--edit-repo-url https://github.com/${{ github.repository }} \
--edit-repo-branch main
- if: ${{ github.ref == 'refs/heads/main' }}
name: Publish compiled course
run: |
git fetch origin compiled2024
poetry run python -m ghp_import -m "Compiled" -b compiled2024 --push _compiled/
uv run python -m ghp_import -m "Compiled" -b compiled2024 --push _compiled/
curl -H 'Content-Type: application/json' \
--data '{"repository": "https://github.com/${{ github.repository }}", "branch": "compiled2024"}' \
https://hooks.nauc.se/trigger
Expand Down

0 comments on commit dc322e2

Please sign in to comment.