Merge pull request #8 from ASFHyP3/its-live #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
paths: | |
- its-live-data/README.md | |
- shared/index.html | |
jobs: | |
deploy-its-live-data-files: | |
runs-on: ubuntu-latest | |
environment: | |
name: its-live-data | |
url: https://its-live-data.s3.us-west-2.amazonaws.com/README.html | |
steps: | |
- uses: actions/checkout@v4 | |
# To test, run: | |
# docker run -it --rm -v ${PWD}:/github/workspace \ | |
# -e INPUT_INPUT_PATH=its-live-data/README.md \ | |
# -e INPUT_OUTPUT_DIR=its-live-data/ \ | |
# -e INPUT_BUILD_PDF=false \ | |
# ghcr.io/baileyjm02/markdown-to-pdf/markdown-to-pdf:latest | |
- name: Create its-live-data/README.html | |
uses: baileyjm02/markdown-to-pdf@v1 | |
with: | |
input_path: its-live-data/README.md | |
output_dir: its-live-data/ | |
build_pdf: false | |
- name: Create its-live-data/index.html | |
run: | | |
sed "165s/\[OPENDATA_BUCKET_NAME\]/its-live-data/" shared/index.html > its-live-data/index.html | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Copy README and Index to S3 | |
run: | | |
aws s3 cp ./its-live-data/README.html s3://its-live-data/README.html | |
aws s3 cp ./its-live-data/index.html s3://its-live-data/index.html |