Skip to content

Commit 98b01dc

Browse files
committed
ci: add ci for gh-pages
1 parent cd43aa3 commit 98b01dc

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/pages.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy website to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
pull_request:
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Default to bash
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
jobs:
18+
# Build job
19+
build:
20+
runs-on: ubuntu-latest
21+
env:
22+
HUGO_VERSION: 0.122.0
23+
steps:
24+
- name: Install and Build
25+
run: npm install && npm run build
26+
- name: Deploy
27+
uses: peaceiris/actions-gh-pages@v4
28+
# If you're changing the branch from main,
29+
# also change the `main` in `refs/heads/main`
30+
# below accordingly.
31+
if: github.ref == 'refs/heads/master'
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./website

0 commit comments

Comments
 (0)