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: