Skip to content

Commit 37b5537

Browse files
committed
add deploy job
1 parent 1605a8d commit 37b5537

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/deploy.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- main
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
# Single deploy job since we're just deploying
27+
deploy:
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: true # Fetch Hugo themes (true OR recursive)
37+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
38+
# Build the site
39+
- name: Setup Hugo
40+
uses: peaceiris/actions-hugo@v3
41+
with:
42+
hugo-version: "latest"
43+
extended: true
44+
- name: Build
45+
run: hugo
46+
# Prepare GH Pages
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
# Upload built site to GH Pages
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: "./public"
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)