-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 992 Bytes
/
publish-s3.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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