Skip to content

Commit a5d5f55

Browse files
committed
CI
1 parent af00b83 commit a5d5f55

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'Deploy to Gitub Pages'
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'hyperupcall-ci'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
runs-on: 'ubuntu-24.04'
23+
concurrency:
24+
group: '${{ github.workflow }}-${{ github.ref }}'
25+
steps:
26+
- uses: 'actions/checkout@v4'
27+
with:
28+
submodules: 'recursive'
29+
- uses: 'peaceiris/actions-hugo@v3'
30+
with:
31+
hugo-version: '0.136.4'
32+
extended: true
33+
- run: 'hugo mod get'
34+
- run: 'hugo --minify'
35+
- run: 'tar -cv -f ./archive.tar ./public'
36+
- uses: 'actions/upload-artifact@v4'
37+
with:
38+
path: './archive.tar'
39+
retention-days: 1
40+
compression-level: 0
41+
if-no-files-found: 'error'
42+
- uses: 'peaceiris/actions-gh-pages@v4'
43+
if: ${{ github.ref == 'refs/heads/main' }}
44+
with:
45+
github_token: '${{ secrets.GITHUB_TOKEN }}'
46+
publish_dir: './public'

0 commit comments

Comments
 (0)