Skip to content

Merge pull request #56 from PyDataCZ/PetraVidnerova-patch-1 #235

Merge pull request #56 from PyDataCZ/PetraVidnerova-patch-1

Merge pull request #56 from PyDataCZ/PetraVidnerova-patch-1 #235

Workflow file for this run

name: Compile course
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v1
with:
version: "latest"
- name: Install dependencies
run: |
uv sync
- name: Compile the course
run: |
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
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ghp_import
GIT_COMMITTER_NAME: ghp_import
EMAIL: none@invalid