Skip to content

Commit 4f97fdc

Browse files
authored
ci: collect + push statics on build
1 parent b84c717 commit 4f97fdc

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,20 @@ jobs:
177177
echo "Build release tarball..."
178178
mkdir -p /home/runner/work/release
179179
tar -czf /home/runner/work/release/release.tar.gz -X dev/deploy/exclude-patterns.txt .
180+
181+
- name: Collect + Push Statics
182+
env:
183+
DEBIAN_FRONTEND: noninteractive
184+
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_KEY_ID }}
185+
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_KEY_SECRET }}
186+
AWS_DEFAULT_REGION: auto
187+
AWS_ENDPOINT_URL: ${{ secrets.CF_R2_ENDPOINT }}
188+
run: |
189+
echo "Collecting statics..."
190+
docker run --rm --name collectstatics -v $(pwd):/workspace ghcr.io/ietf-tools/datatracker-app-base:latest sh dev/deploy/collectstatics.sh
191+
echo "Pushing statics..."
192+
cd static
193+
aws s3 sync . s3://static/dt/$PKG_VERSION
180194
181195
- name: Update CHANGELOG
182196
id: changelog

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ datatracker.sublime-workspace
2323
/media
2424
/node_modules
2525
/release-coverage.json
26+
/static
2627
/tmp-*
2728
/.testresult
2829
*.pyc

dev/deploy/collectstatics.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Install Python dependencies
4+
pip --disable-pip-version-check --no-cache-dir install -r requirements.txt
5+
6+
# Collect statics
7+
ietf/manage.py collectstatic

0 commit comments

Comments
 (0)