added content #18
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
name: Deploy to Production | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Deploy to production | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "deployerDscMec" | |
git fetch | |
git checkout production | |
git branch | |
git reset --hard master | |
wget https://github.com/gohugoio/hugo/releases/download/v0.105.0/hugo_0.105.0_linux-amd64.deb | |
sudo dpkg -i hugo_0.105.0_linux-amd64.deb | |
git submodule update --init --recursive | |
hugo --minify | |
git add . | |
git commit -m "Deploy to production" | |
git push origin production -f |