Created
February 24, 2021 10:27
-
-
Save apoorvmote/0779f191a109e93af39b594b09a36e20 to your computer and use it in GitHub Desktop.
This file contains 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
version: 0.2 | |
env: | |
variables: | |
hugo_version: "0.81.0" | |
phases: | |
install: | |
runtime-versions: | |
nodejs: 14.x | |
commands: | |
- echo Installing hugo | |
- wget "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_Linux-64bit.deb" | |
- dpkg -i hugo_extended_${hugo_version}_Linux-64bit.deb | |
- echo Installing npm packages | |
- npm install | |
- npm update | |
finally: | |
- hugo version | |
build: | |
commands: | |
- git config --global user.email "[email protected]" | |
- git config --global user.name "John Doe" | |
- git init | |
- git add . | |
- git commit -m 'build commit' | |
- echo Building Website content | |
- hugo | |
- echo Built hugo on `date` | |
artifacts: | |
base-directory: ./public | |
files: | |
- '**/*' |
This file contains 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
version: '3' | |
vars: | |
COMMIT_MESSAGE: added new post | |
tasks: | |
default: | |
cmds: | |
- npm update | |
- git add . | |
- git commit -m "{{.COMMIT_MESSAGE}}" | |
- git push origin master | |
build: | |
cmds: | |
- hugo | |
- aws s3 sync ./public/ s3://example.com/ --delete | |
- rm -rf ./public |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment