Skip to content

Commit 8d41b65

Browse files
committed
fix ci workflow
1 parent 257bc4a commit 8d41b65

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1-
name: Publish Site
1+
name: Deploy Hugo site to GitHub Pages
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67

78
jobs:
8-
build-deploy:
9+
build:
910
runs-on: ubuntu-latest
11+
1012
steps:
11-
- name: Checkout repository
12-
uses: actions/checkout@master
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v1
18+
19+
- name: Build Docker image
20+
run: docker build -t hugo-builder .
21+
22+
- name: Convert .tex to .svg
23+
run: docker run -v ${{ github.workspace }}:/workspace hugo-builder make -C /workspace
24+
25+
- name: Setup Hugo
26+
uses: peaceiris/actions-hugo@v2
27+
with:
28+
hugo-version: '0.125.7'
29+
extended: true
30+
31+
- name: Build site
32+
run: hugo --minify
1333

14-
- name: Build site
15-
uses: ./
34+
- name: Deploy to GitHub Pages
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./public
1639

17-
- name: Deploy to GH-Pages
18-
uses: peaceiris/actions-gh-pages@v3
19-
with:
20-
github_token: ${{ secrets.DEPLOY_TOKEN }}
21-
publish_dir: ./public

0 commit comments

Comments
 (0)