Skip to content

feat(advocacy): add Copyright Office fees comment #64

feat(advocacy): add Copyright Office fees comment

feat(advocacy): add Copyright Office fees comment #64

Workflow file for this run

name: Deploy to Github Pages
on:
push:
branches: [ "master" ]
paths:
- 'content/**'
- 'themes/**'
- 'config.toml'
- 'src/**'
- 'package.json'
- 'tsconfig.json'
- '.github/workflows/github-pages.yml'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: 'checkout'
uses: actions/checkout@v4
- name: 'setup node'
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: 'install dependencies'
run: npm ci
- name: 'compile typescript'
run: npm run build:ts
- name: 'update build timestamp'
run: |
current_time=$(date -u +"%Y-%m-%d-%H-%M")
sed -i "s/build_timestamp = .*/build_timestamp = \"$current_time\"/" config.toml
- name: 'build site with zola'
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: master
BUILD_DIR: .
BUILD_ONLY: true
GITHUB_TOKEN: ${{ secrets.DEPLOY_KEY }}
- name: 'check file sizes (14KB limit)'
run: |
echo "Checking HTML files against 14KB TCP initial congestion window..."
echo "(Exempting /legal/ directory)"
MAX_SIZE=14000
WARNED=0
# Check HTML files (excluding /legal/ directory)
for file in $(find public -name "*.html" -type f | grep -v "public/legal/"); do
size=$(stat -c%s "$file")
if [ "$size" -gt "$MAX_SIZE" ]; then
echo "::warning file=$file::File is ${size} bytes (exceeds ${MAX_SIZE} byte limit)"
WARNED=1
else
echo "OK: $file is ${size} bytes"
fi
done
# Report legal files (info only)
for file in $(find public/legal -name "*.html" -type f 2>/dev/null); do
size=$(stat -c%s "$file")
echo "EXEMPT: $file is ${size} bytes (legal content)"
done
if [ "$WARNED" -eq 1 ]; then
echo ""
echo "::notice::Some HTML files exceed 14KB. See: https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/"
else
echo ""
echo "All checked HTML files are within the 14KB limit."
fi
- name: 'deploy to github pages'
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: master
BUILD_DIR: .
BUILD_FLAGS: "--base-url https://usips.org"
GITHUB_TOKEN: ${{ secrets.DEPLOY_KEY }}
REPOSITORY: usips/usips.github.io