Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build branches other than 'main' #43

Merged
merged 2 commits into from
Aug 28, 2024
Merged
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