Skip to content

Instantly share code, notes, and snippets.

@aminnairi
Last active September 8, 2020 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminnairi/3aebec2a7ac412e776839a4e640f7193 to your computer and use it in GitHub Desktop.
Save aminnairi/3aebec2a7ac412e776839a4e640f7193 to your computer and use it in GitHub Desktop.
GitHub Pages deploy script for Docker Compose project using Yarn
#!/bin/sh
# sh deploy.sh
docker-compose exec node yarn build
git add --force dist
git commit -m ":package: new build"
git subtree split --prefix dist -b gh-pages
git push --force origin gh-pages:gh-pages
git reset --hard HEAD^
git branch -D gh-pages
rm -rf dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment