Reset #82
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: CD | |
on: pull_request | |
jobs: | |
Build: | |
runs-on: | |
- self-hosted | |
- CI-CD | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.BUILD_WEBSITE_TOKEN }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Build website | |
run: rm -rf public && hugo | |
- name: Commit automated build | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
if [ "$(git status --porcelain)" ]; then | |
git add . | |
git commit -m "Automated build" | |
git push | |
else | |
echo "No changes to commit" | |
fi |