From ca85de4bd542bd7b7b068c2cd007e6a7fe2f5c8a Mon Sep 17 00:00:00 2001 From: use-to <13922835+use-to@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:41:25 +0200 Subject: [PATCH] ci: add main release on cdn --- .github/workflows/latex.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 4df0f35..ac67fe5 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -43,5 +43,17 @@ jobs: r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} r2-bucket: ${{ secrets.R2_BUCKET }} - source-dir: ./output + source-dir: ./output/ destination-dir: ${{ github.sha }} + + - name: Release on cdn (on main) + if: github.ref == 'refs/heads/main' + uses: ryand56/r2-upload-action@latest + with: + r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} + r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} + r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} + r2-bucket: ${{ secrets.R2_BUCKET }} + source-dir: ./output/ + destination-dir: main + keep-file-fresh: true