Skip to content

Commit

Permalink
Create deploy-site.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
SamKazan authored Mar 27, 2024
1 parent 7eebc36 commit f506c5b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to Github Pages

# run when a commit is pushed to "source" branch
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
# checkout to the commit that has been pushed
- uses: actions/checkout@v3

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: 'latest'
extended: true

- name: Update Hugo Modules
run: hugo mod tidy

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install node modules
run: |
hugo mod npm pack
npm install
- name: Build
run: hugo --minify

# push the generated content into the `gh-pages` branch.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public

0 comments on commit f506c5b

Please sign in to comment.