cache:
pip: true
directories:
- - node_modules
+ - node_modules
python:
- 3.6
services:
-- docker
+ - docker
before_install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source ~/.nvm/nvm.sh
- git fetch origin gh-pages
- git checkout -b gh-pages origin/gh-pages
- git push coding gh-pages:coding-pages -f
+ - git checkout -b cdn-pages origin/gh-pages
+ - find ./ -type f -name "*.html" -exec sed -i -E 's/([^"]*)(assets[^"]*)/https:\/\/cdn-for-oi-wiki.billchn.com\/\2/' {} +
+ - git add .
+ - git commit --author "24OI-bot <15963390+24OI-bot@users.noreply.github.com>" -m "build cdn files"
+ - git push coding cdn-pages:cdn-pages -f
find ./site -type f -name '*.html' -exec node --max_old_space_size=512 ./scripts/render_math.js {} \;
+find ./site -type f -name "*.html" -exec sed -i -E 's/([^"]*)(assets[^"]*)/https:\/\/cdn-for-oi-wiki.billchn.com\/\2/' {} +
+
# npx gulp minify
# try to avoid netlify timeout