Skip to content

Create 2023-07-07 Do Fewer Things Better.md #17

Create 2023-07-07 Do Fewer Things Better.md

Create 2023-07-07 Do Fewer Things Better.md #17

name: Generate & Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- name: Clone Source Repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # git history for .GitInfo and .Lastmod
- name: Clone Generated Repository
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: fizzadar/pointlessramblings.com-generated
path: public
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.76.5'
- name: Generate
run: hugo
- name: Push & Update
run: |
cd public/
if [[ `git status --porcelain` ]]; then
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Site build $(date -I)"
git push origin HEAD:main
fi