ci: collect + push statics on build

This commit is contained in:
Nicolas Giard 2024-01-15 18:28:33 -05:00 committed by GitHub
parent b84c717e09
commit 4f97fdcb1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 0 deletions

View file

@ -177,6 +177,20 @@ jobs:
echo "Build release tarball..."
mkdir -p /home/runner/work/release
tar -czf /home/runner/work/release/release.tar.gz -X dev/deploy/exclude-patterns.txt .
- name: Collect + Push Statics
env:
DEBIAN_FRONTEND: noninteractive
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_KEY_SECRET }}
AWS_DEFAULT_REGION: auto
AWS_ENDPOINT_URL: ${{ secrets.CF_R2_ENDPOINT }}
run: |
echo "Collecting statics..."
docker run --rm --name collectstatics -v $(pwd):/workspace ghcr.io/ietf-tools/datatracker-app-base:latest sh dev/deploy/collectstatics.sh
echo "Pushing statics..."
cd static
aws s3 sync . s3://static/dt/$PKG_VERSION
- name: Update CHANGELOG
id: changelog

1
.gitignore vendored
View file

@ -23,6 +23,7 @@ datatracker.sublime-workspace
/media
/node_modules
/release-coverage.json
/static
/tmp-*
/.testresult
*.pyc

View file

@ -0,0 +1,7 @@
#!/bin/bash
# Install Python dependencies
pip --disable-pip-version-check --no-cache-dir install -r requirements.txt
# Collect statics
ietf/manage.py collectstatic