Skip to content

Commit

Permalink
add deploy action
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Mirz <[email protected]>
  • Loading branch information
m-mirz committed Nov 7, 2022
1 parent ffddb14 commit bf465d6
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to Github Pages

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache Hugo resources
uses: actions/cache@v2
env:
cache-name: cache-hugo-resources
with:
path: resources
key: ${{ env.cache-name }}

- uses: actions/setup-go@v2
with:
go-version: "^1.17.0"
- run: go version

- name: Cache Go Modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true

- name: Build
run: hugo --minify --gc

- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: public
clean: true
single-commit: true

0 comments on commit bf465d6

Please sign in to comment.