diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 448fd232d7..1998509bc6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.gitignore b/.gitignore index 80e5f0228b..4de5e53ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ datatracker.sublime-workspace /media /node_modules /release-coverage.json +/static /tmp-* /.testresult *.pyc diff --git a/dev/deploy/collectstatics.sh b/dev/deploy/collectstatics.sh new file mode 100644 index 0000000000..3fcc012901 --- /dev/null +++ b/dev/deploy/collectstatics.sh @@ -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 \ No newline at end of file