Typo fixed in howto configuration.md #440
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 Prod to gh pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
deploy-prod: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Checkout build environment | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
path: build-environment | |
- uses: actions/[email protected] | |
with: | |
node-version: 16 | |
check-latest: true | |
- name: Get Hugo Version | |
id: hugo-version | |
run: | | |
version=$(jq -r .hugo "build-environment/scripts/.util/tools.json") | |
echo "version=${version#v}" >> "$GITHUB_OUTPUT" | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: ${{ steps.hugo-version.outputs.version }} | |
extended: true | |
- name: Build | |
run: cd build-environment && npm install && hugo | |
- name: Update | |
run: | | |
git rm -r --ignore-unmatch . | |
cp -a build-environment/public/* . | |
rm -rf build-environment | |
- name: Commit | |
id: commit | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "paketo-bot" | |
if [[ -n "$(git status --short)" ]]; then | |
git add --all . | |
git commit --message "Deploying" | |
echo "commit_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Push | |
if: ${{ steps.commit.outputs.commit_sha != '' }} | |
run: git push origin gh-pages |