Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,16 @@ jobs:
poetry install -E ghp-compiled
- name: Compile the courses
run: |
for slug in pyladies mi-pyt meta lessons; do
poetry run python -m naucse_render compile _compiled/$slug --slug $slug \
poetry run python -m naucse_render compile _compiled \
--edit-repo-url https://github.com/${{ github.repository }} \
--edit-repo-branch main
done
- if: ${{ github.ref == 'refs/heads/main' }}
--edit-repo-branch ${{ github.ref_name }}
- if: ${{ startsWith(github.ref, 'refs/heads/') }}
name: Publish compiled courses
run: |
git fetch origin compiled || :
poetry run python -m ghp_import -m "Compiled" -b compiled --push _compiled/
git fetch origin compiled/${{ github.ref_name }} || :
poetry run python -m ghp_import -m "Compiled" -b compiled/${{ github.ref_name }} --push _compiled/
curl -H 'Content-Type: application/json' \
--data '{"repository": "https://github.com/${{ github.repository }}", "branch": "compiled"}' \
--data '{"repository": "https://github.com/${{ github.repository }}", "branch": "compiled/${{ github.ref_name }}"}' \
https://hooks.nauc.se/trigger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading