Skip to content

Publish to S3

Publish to S3 #35

Workflow file for this run

name: Publish to S3
on:
workflow_run:
workflows: ["Run Code Checks"]
branches:
- main
types:
- completed
jobs:
publish-s3:
runs-on: ubuntu-20.04
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: wheels_cache
with:
path: ./wheels
key: wheels-${{ github.sha }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
aws-region: eu-central-1
- name: upload wheels to S3
run: |
find wheels/ -type f
aws s3 sync wheels/ ${S3_DEST}/
# re-render index.html
aws s3 ls ${S3_DEST}/ | ./scripts/render-simple-index.awk > wheels/index.html
aws s3 cp wheels/index.html ${S3_DEST}/index.html
env:
S3_DEST: s3://wfp-vam-www/pypi/hdc-algo