From 20096792c09af9b2bd22edfae768d2158389d9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Ahlb=C3=A4ck?= Date: Mon, 13 Jan 2025 14:18:34 +0100 Subject: [PATCH] Push releases to website --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5158097f4..00e0e6c6e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -206,6 +206,37 @@ jobs: run: | gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA flint-${FLINT_VERSION}.{tar.gz,tar.xz,zip} + - if: env.TAG_NAME != 'nightly' + name: "Setup for PDF documentation" + run: | + sudo apt-get install -y python3-sphinx + sphinx-build --version + + - if: env.TAG_NAME != 'nightly' + name: "Build PDF documentation" + uses: dante-ev/latex-action@latest + with: + root_file: + compiler: + args: + entrypoint: doc/entrypoint.sh + + - if: env.TAG_NAME != 'nightly' + name: "Setup SSH key" + uses: shimataro/ssh-key-action@v2.7.0 + with: + key: ${{ secrets.SSH_KEY }} + name: id_ed25519 + known_hosts: ${{ secrets.KNOWN_HOSTS }} + + - if: env.TAG_NAME != 'nightly' + name: "Upload to website" + run: | + # Push documentation and tarballs to server + mv doc/build/latex/flint.pdf flint-${FLINT_VERSION}.pdf + for ext in pdf tar.gz zip; do + scp flint-${FLINT_VERSION}.$ext wbhart@opal6.opalstack.com:~/apps/flintlib_org/download/ + # Rebuild the website + ssh -t wbhart@opal6.opalstack.com 'cd ~/flintwebpage && python3 downloads.py ~/apps/flintlib_org && python3 build.py ~/apps/flintlib_org' + # TODO: we could / should perhaps also test `make install` ? -# TODO: also trigger a documentation build and upload the result? -# TODO: if desired, we could e.g. also upload the archive to a server via scp