Skip to content

Commit e8d3b30

Browse files
committed
feat: ✨ Add github action
1 parent 6d64039 commit e8d3b30

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/hugo-deploy.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: false
14+
defaults:
15+
run:
16+
shell: bash
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v5
23+
with:
24+
submodules: recursive
25+
fetch-depth: 0
26+
- name: Build
27+
uses: docker://hugomods/hugo:exts
28+
with:
29+
args: sh -c "hugo --minify"
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: ./public
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)