This commit is contained in:
@@ -7,20 +7,28 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Reczne pobranie kodu
|
||||
run: |
|
||||
# Klonujemy kod do folderu "repo" (bezpieczniej niż do obecnego)
|
||||
git clone http://gitea.archvium.eu:30230/OleksiiS/Dokumentacja-Latex.git repo
|
||||
run: git clone http://gitea.archvium.eu:30230/OleksiiS/Dokumentacja-Latex.git repo
|
||||
|
||||
- name: Run Makefile in Docker
|
||||
# Natywny sposób Gitea/GitHub na użycie obrazu Docker do konkretnego kroku
|
||||
uses: docker://registry.gitlab.com/islandoftex/images/texlive:latest
|
||||
with:
|
||||
# Mówimy kontenerowi: wejdź do folderu 'repo' i odpal 'make all'
|
||||
entrypoint: sh
|
||||
args: -c "cd repo && make all"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Dokumentacja_PDF
|
||||
path: "repo/*.pdf"
|
||||
# NOWY KROK: Zamiast upload-artifact, robimy commita z PDFami
|
||||
- name: Zapisz PDFy w repozytorium
|
||||
run: |
|
||||
cd repo
|
||||
# Konfiguracja gita wewnątrz runnera
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
|
||||
# Tworzymy nową gałąź lub przechodzimy na nią
|
||||
git checkout -B gotowe-pdfy
|
||||
|
||||
# Dodajemy tylko pliki PDF
|
||||
git add *.pdf
|
||||
|
||||
# Robimy commita i wypychamy na serwer
|
||||
git commit -m "Automatyczna kompilacja LaTeX" || echo "Brak zmian do zapisu"
|
||||
git push http://gitea.archvium.eu:30230/OleksiiS/Dokumentacja-Latex.git gotowe-pdfy -f
|
||||
Reference in New Issue
Block a user