Last active
February 12, 2020 12:24
-
-
Save jlandure/d9be06d672c05905fdcc36c440cfdcaa to your computer and use it in GitHub Desktop.
hugo command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #Fetch Nantes branch | |
| env | |
| echo $'#!/bin/bash\nif [ "$CI_BRANCH" = "nantes" ]\nthen\n echo "Not a PullRequest, checkout nantes branch"\n git fetch origin\n git checkout nantes\nfi\n' > git-command.sh | |
| cat git-command.sh | |
| chmod +x git-command.sh && ./git-command.sh | |
| rm -Rf themes/devfest-theme-hugo | |
| git clone https://github.com/GDG-Nantes/devfest-theme-hugo.git themes/devfest-theme-hugo | |
| #Get Hugo | |
| #curl -fsSL -o /tmp/hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.55.2/hugo_extended_0.55.2_Linux-64bit.tar.gz | |
| curl -fsSL -o /tmp/hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_extended_0.54.0_Linux-64bit.tar.gz | |
| tar -xzf /tmp/hugo.tar.gz | |
| ls -l | |
| chmod +x ./hugo | |
| ./hugo version | |
| #Install npm | |
| nvm install 11.6.0 | |
| nvm use 11.6.0 | |
| node -v | |
| cd themes/devfest-theme-hugo | |
| git fetch origin | |
| git checkout nantes | |
| npm install | |
| npm run build | |
| #Launch Hugo Generation | |
| cd ../.. | |
| ./hugo -D | |
| ls -al public |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deploy: