From 4a43ccfe8ed56949719f60325f98882c96d33282 Mon Sep 17 00:00:00 2001 From: Eric Nantz Date: Fri, 3 May 2024 13:13:49 +0000 Subject: [PATCH] experiment with publishign ADRG pdf to object storage --- .github/workflows/publish-adrg.yaml | 41 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish-adrg.yaml b/.github/workflows/publish-adrg.yaml index 130f990..fe74b44 100644 --- a/.github/workflows/publish-adrg.yaml +++ b/.github/workflows/publish-adrg.yaml @@ -20,6 +20,13 @@ jobs: - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 + - name: Install font dependencies + id: install-fonts + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: fonts-dejavu-core fonts-dejavu-extra + version: 1.0 + - name: Install R uses: r-lib/actions/setup-r@v2 with: @@ -30,33 +37,29 @@ jobs: with: cache-version: 1 - - name: Render ADRG (custom) - if: ${{ false }} + - name: Render ADRG PDF (custom) env: QUARTO_PRINT_STACK: true run: | - quarto render adrg/adrg-quarto.qmd --to html + quarto render adrg/adrg-quarto-pdf.qmd --to pdf shell: bash - - name: Publish to GH pages (custom) - if: ${{ false }} - env: - QUARTO_PRINT_STACK: true - run: | - quarto publish gh-pages adrg/adrg-quarto.qmd --no-render --no-browser --no-prompt - - - name: Publish HTML version to GH pages - if: ${{ false }} - uses: quarto-dev/quarto-actions/publish@v2 - with: - target: gh-pages - path: adrg/adrg-quarto-html.qmd - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish ADRG HTML version to Quarto Pub uses: quarto-dev/quarto-actions/publish@v2 with: target: quarto-pub path: adrg/adrg-quarto-html.qmd QUARTO_PUB_AUTH_TOKEN: ${{ secrets.QUARTO_PUB_AUTH_TOKEN }} + + - name: Set up object storage s3cmd cli tool + uses: s3-actions/s3cmd@v1.6.1 + with: + provider: linode + region: 'us-east-1' + access_key: ${{ secrets.S3_ACCESS_KEY }} + secret_key: ${{ secrets.S3_SECRET_KEY }} + + - name: Publish ADRG PDF version to Linode Object Storage + run: | + s3cmd put adrg/adrg-quarto-pdf.pdf --mime-type 'application/pdf' --acl-public s3://rsubmission-draft/adrg-quarto-pdf.pdf +