hugo-landing-page
hugo-landing-page copied to clipboard
Can you add Github Action for deployment on GitHub Pages?
I wanted to automate my workflow on gh pages and I have been struggling to use npm run deploy can you tell me what I am doing wrong?
I try to deploy it but the website broke: http://abidaliawan.me/exfinite/
Do let me know what I am doing wrong.
Supporting specific configurations and/or deployment workflows is currently out of scope of a template like this, sorry.
These links might help you:
- https://gohugo.io/hosting-and-deployment/hosting-on-github/
- https://github.com/marketplace/actions/hugo-setup
I have used the same guide and I tried everything to get better results and hugo guide dosent work. Well thank you.
Deploying to gh-pages using Github actions worked fine for me. Here is my workflow script in case useful:
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.91.2'
- name: Install and Build
run: |
npm install
npm run deploy
touch public/.nojekyll
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.