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