From 22b2bfad913bcdde94bea0efdc8bee06ac71b25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Tue, 17 Oct 2023 22:15:53 +0200 Subject: [PATCH] adjust to gitea ci --- .ci/build_document.sh | 13 ----------- .ci/git-info-2.sh => .git-info-2.sh | 0 .gitea/workflows/compile.yaml | 21 ++++++++++++++++++ .gitlab-ci.yml | 34 ----------------------------- Makefile | 8 +++---- 5 files changed, 25 insertions(+), 51 deletions(-) delete mode 100755 .ci/build_document.sh rename .ci/git-info-2.sh => .git-info-2.sh (100%) create mode 100644 .gitea/workflows/compile.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.ci/build_document.sh b/.ci/build_document.sh deleted file mode 100755 index cc2542b..0000000 --- a/.ci/build_document.sh +++ /dev/null @@ -1,13 +0,0 @@ -set -e -echo "Building document" -make pdf -mkdir public -mv build/2023_Game_Theory_in_Flow_Problems.pdf public -mv build/2023_Game_Theory_in_Flow_Problems.log public -cd public/ -if ! command -v tree &> /dev/null -then - echo "No tree utility found, skipping making tree" -else - tree -H '.' -I "index.html" -D --charset utf-8 -T "Optimization and Game Theory in Flow Problems" > index.html -fi diff --git a/.ci/git-info-2.sh b/.git-info-2.sh similarity index 100% rename from .ci/git-info-2.sh rename to .git-info-2.sh diff --git a/.gitea/workflows/compile.yaml b/.gitea/workflows/compile.yaml new file mode 100644 index 0000000..3b39da3 --- /dev/null +++ b/.gitea/workflows/compile.yaml @@ -0,0 +1,21 @@ +name: Compile LaTeX +on: [push] + +jobs: + build: + runs-on: latex-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Compile document + run: | + make pdf + mkdir public + mv build/2023_Game_Theory_in_Flow_Problems.pdf public/ + mv build/2023_Game_Theory_in_Flow_Problems.log public/ + - name: Deploy to Pages + uses: actions/pages@v1 + with: + index-tile: "Game Theory in Flow Problems" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 659c2af..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -stages: - - build - - pages - -default: - tags: - - latex - -build-document: - stage: build - script: - - .ci/build_document.sh - variables: - GIT_SUBMODULE_STRATEGY: recursive - artifacts: - paths: - - public/ - only: - - tags - - branches - # - merge_requests - - -pages: - stage: pages - artifacts: - paths: - - public/ - script: - - echo "Deploying to pages" - - test -f public/2023_Game_Theory_in_Flow_Problems.pdf - only: - - master - - main diff --git a/Makefile b/Makefile index 2b611ef..6436d40 100644 --- a/Makefile +++ b/Makefile @@ -21,10 +21,10 @@ init: .init-submodule-cert .init-git-hooks-cert .init-git-hooks-cert: @echo "[Make] Setting up git hooks for package gitinfo2" @mkdir -p .git/hooks - @cp .ci/git-info-2.sh .git/hooks/post-merge - @cp .ci/git-info-2.sh .git/hooks/post-checkout - @cp .ci/git-info-2.sh .git/hooks/post-commit - @.ci/git-info-2.sh + @cp .git-info-2.sh .git/hooks/post-merge + @cp .git-info-2.sh .git/hooks/post-checkout + @cp .git-info-2.sh .git/hooks/post-commit + @./.git-info-2.sh @touch .init-git-hooks-cert