From 823c5097ceb13312814611be2ee0c852b716a7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 19 Oct 2023 02:21:13 +0200 Subject: [PATCH] adjust ci to new build style --- .ci/build_doc.sh | 9 +++++++++ .ci/{ci_build.sh => deploy_to_build_repo.sh} | 14 +++++--------- .gitea/workflows/build.yaml | 17 +++++++++++++---- 3 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 .ci/build_doc.sh rename .ci/{ci_build.sh => deploy_to_build_repo.sh} (51%) diff --git a/.ci/build_doc.sh b/.ci/build_doc.sh new file mode 100644 index 0000000..6b32f75 --- /dev/null +++ b/.ci/build_doc.sh @@ -0,0 +1,9 @@ +set -e + +# set up packages to be available for latex +mkdir -p ~/texmf/tex/latex +ln -s build/packages ~/texmf/tex/latex/packages + +# generate doc +make doc + diff --git a/.ci/ci_build.sh b/.ci/deploy_to_build_repo.sh similarity index 51% rename from .ci/ci_build.sh rename to .ci/deploy_to_build_repo.sh index 15b21c7..ea88ade 100755 --- a/.ci/ci_build.sh +++ b/.ci/deploy_to_build_repo.sh @@ -1,18 +1,14 @@ set -e + +# set up deploy message cd .ci export COMMIT_MSG=$(python3 print_deploy_message.py) cd .. -make ci-build -cd build/LatexPackagesBuild + +# push pages to build repository +cd build/packages git add . git commit -m "${COMMIT_MSG}" || echo "Nothing new to commit" git remote set-url origin --push git@git.abstractnonsen.se:latex/latex-packages-build git push --set-upstream origin ${REF_NAME}-build cd ../.. -mkdir -p ~/texmf/tex/latex -cp -r build/LatexPackagesBuild ~/texmf/tex/latex -make doc -cd build -mv LatexPackagesBuild LatexPackages -zip -r LatexPackages.zip LatexPackages/ -x '*.git*' -zip -r LatexPackagesDocumentation.zip documentation diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index d960708..7478189 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -19,19 +19,28 @@ jobs: uses: actions/checkout@v4 with: repository: latex/latex-packages-build - path: build/LatexPackagesBuild + path: build/packages ref: master - name: Checkout correct branch in build repository run: | .ci/setup_build_repo_branch.sh env: REF_NAME: ${{ github.ref_name }} - - name: Build packages + - name: Build packages incrementally + run: make + - name: Push pages to build repo run: | - .ci/ci_build.sh # Note that this includes pushing to the build mirror + .ci/deploy_to_build_repo.sh env: REF_NAME: ${{ github.ref_name }} - - name: deploy pages + - name: Prepage pages + if: github.ref == 'refs/heads/master' + run: | + cd build + rm -rf packages/.git # Don't deploy the git files + zip -r latex-packages.zip packages/ -x '*.git*' + zip -r latex-packages-doc.zip doc + - name: Deploy to pages if: github.ref == 'refs/heads/master' uses: actions/pages@v1 with: