Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

idea: deploy static files on github pages CDN

$
0
0
I had an idea today that I wanted to share, if anyone finds it helpful or
has feedback.

./manage.py collectstatic
cd $STATIC_ROOT
rm -rf .git/ # optionally don't keep history
git init .
git add .
git commit -m"static files"
git push -f git [ at ] github.com:username/yourrepo master:gh-pages

then set STATIC_URL = '//username.github.io/yourrepo/'

It works just fine, even on private repositories.

Viewing all articles
Browse latest Browse all 6551

Trending Articles