Skip to content

Deploy

Deploy #760

Workflow file for this run

---
name: Deploy
on:
push:
branches:
- main
# Scheduled tasks only run on the main branch.
schedule:
- cron: '0 10 * * *' # Daily at 10AM UTC.
workflow_dispatch:
jobs:
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Clone code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install build dependencies
run: |
python -m pip install -r requirements.txt
- name: Fetch latest packages data and build the website
run: |
make generate
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::386531310338:role/pythonwheels_deploy_from_github
aws-region: eu-west-1
- name: Deploy the built files
run: |
TIMESTAMP=$(date --iso-8601=seconds --utc)
echo $TIMESTAMP
aws s3 cp index.html s3://pythonwheels.com
aws s3 cp wheel.css s3://pythonwheels.com
aws s3 cp wheel.svg s3://pythonwheels.com
aws s3 cp results.json s3://pythonwheels.com/results/${TIMESTAMP}.json
aws s3 cp s3://pythonwheels.com/results/${TIMESTAMP}.json s3://pythonwheels.com/results.json