Deploy Hugo Site to GitHub Pages #4
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 Hugo Site to GitHub Pages | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-and-deploy-to-dev: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: latest | |
extended: true | |
- name: Build Hugo site | |
run: hugo | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.DEVOPSLOOP_DEV_DEPLOY_KEY }} | |
publish_dir: ./public | |
publish_branch: main | |
external_repository: "devopsloop-ss/devopsloop-ss.github.io" | |
cname: devopsloop-ss.github.io | |
- name: Display deployment link | |
run: | | |
echo " Site deployed to: https://devopsloop-ss.github.io Please test it!" |