Skip to content

Commit e5569ea

Browse files
committed
add settings for CI
1 parent d654f88 commit e5569ea

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Page Build
2+
3+
on: [push]
4+
5+
concurrency:
6+
group: "pages"
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # Fetch all history for .GitInfo and .
16+
17+
- name: Typo check
18+
uses: crate-ci/typos@v1.29.0
19+
20+
- name: Setup Hugo
21+
uses: peaceiris/actions-hugo@v3
22+
with:
23+
hugo-version: "latest"
24+
25+
- name: Build
26+
run: hugo
27+
28+
- name: Check broken links
29+
uses: ruzickap/action-my-broken-link-checker@v2
30+
with:
31+
url: https://py-img-gen.github.iuo
32+
pages_path: ./public
33+
cmd_params: "\
34+
--timeout=20 \
35+
--buffer-size 8192 \
36+
--max-connections=10 \
37+
--max-response-body-size=70000000 \
38+
--ignore-fragments \
39+
-e t.co \
40+
-e twitter.com \
41+
"
42+
43+
- name: Upload artifacts
44+
uses: actions/upload-pages-artifact@v3
45+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
46+
with:
47+
path: ./public
48+
49+
deploy:
50+
needs: build
51+
52+
permissions:
53+
id-token: write
54+
pages: write
55+
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Deploy artifacts
63+
uses: actions/deploy-pages@v4
64+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
65+
id: deployment

0 commit comments

Comments
 (0)