Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pointlessramblings.com/.github/workflows/generate-deploy.yml
View runs Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
42 lines (35 sloc)
998 Bytes
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: 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 |