Skip to content

Commit

Permalink
Fix pdf generation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-polk committed Sep 12, 2023
1 parent 80a41ad commit 30c56d2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/generate-and-upload-pdfs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate PDFs
name: Generate and Upload PDFs
on:
workflow_dispatch:
inputs:
Expand All @@ -9,8 +9,8 @@ on:
type: string
jobs:
release:
name: Generate PDFs
#name: Generate PDF for ${{ inputs.language }}
name: Generate and Upload PDFs
#name: Generate and Upload PDF for ${{ inputs.language }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -26,7 +26,10 @@ jobs:
- name: Generate PDFs
run: yarn make-pdf
- name: Upload PDFs to S3
run: aws s3 cp ./build/ s3://${{ secrets.AWS_BUCKET }}/ --recursive --exclude "*" --include "*.pdf" --exclude "*/*" --dryrun
run: |
aws s3 cp ./build/downloads/ s3://${{ secrets.AWS_BUCKET }}/downloads/ --exclude "*" --include "*.pdf"
aws s3 cp ./build/fr/downloads/ s3://${{ secrets.AWS_BUCKET }}/fr/downloads/ --exclude "*" --include "*.pdf"
aws s3 cp ./build/es/downloads/ s3://${{ secrets.AWS_BUCKET }}/es/downloads/ --exclude "*" --include "*.pdf"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
# Make and upload the PDF after uploading to S3 since the PDF is created from content on S3.
# - name: Prepare PDF Download
# run: yarn make-pdf
# - name: Upload PDFs to S3
# run: aws s3 cp ./build/ s3://${{ secrets.AWS_BUCKET }}/ --recursive --exclude "*" --include "*.pdf" --exclude "*/*"
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_DEFAULT_REGION: "us-east-1"
- name: Generate PDFs
run: yarn make-pdf
- name: Upload PDFs to S3
run: |
aws s3 cp ./build/downloads/ s3://${{ secrets.AWS_BUCKET }}/downloads/ --exclude "*" --include "*.pdf"
aws s3 cp ./build/fr/downloads/ s3://${{ secrets.AWS_BUCKET }}/fr/downloads/ --exclude "*" --include "*.pdf"
aws s3 cp ./build/es/downloads/ s3://${{ secrets.AWS_BUCKET }}/es/downloads/ --exclude "*" --include "*.pdf"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"

0 comments on commit 30c56d2

Please sign in to comment.