ci: collect + push statics on build
This commit is contained in:
parent
b84c717e09
commit
4f97fdcb1b
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
|
@ -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
1
.gitignore
vendored
|
@ -23,6 +23,7 @@ datatracker.sublime-workspace
|
|||
/media
|
||||
/node_modules
|
||||
/release-coverage.json
|
||||
/static
|
||||
/tmp-*
|
||||
/.testresult
|
||||
*.pyc
|
||||
|
|
7
dev/deploy/collectstatics.sh
Normal file
7
dev/deploy/collectstatics.sh
Normal 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
|
Loading…
Reference in a new issue