Update stat counters #26
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 | |
# ----- | |
# This workflow will run whenever changes are pushed to master | |
# ----- | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
# ----- | |
# Grab the latest source | |
# ----- | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# ----- | |
# Install Hugo: https://github.com/peaceiris/actions-hugo | |
# ----- | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
# ----- | |
# Generate site content | |
# ----- | |
- name: Generate Content | |
run: hugo | |
# ----- | |
# Create our nice commit | |
# ----- | |
- name: Commit Files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
CURRENTDATE=`date +"%m/%d/%Y %H:%M"` | |
git add . | |
git commit -am "Deploy ${CURRENTDATE} 🚀" | |
# ----- | |
# Push changes using the action github token: https://github.com/ad-m/github-push-action | |
# ----- | |
- name: Push Changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |