Skip to content

Commit d47ae5c

Browse files
committed
add github action
1 parent e8c20da commit d47ae5c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/zola.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on: push
2+
jobs:
3+
build:
4+
runs-on: ubuntu-latest
5+
if: github.ref != 'refs/heads/master'
6+
steps:
7+
- name: 'checkout'
8+
uses: actions/checkout@v4
9+
- name: 'build'
10+
uses: shalzz/zola-deploy-action@master
11+
env:
12+
PAGES_BRANCH: gh-pages
13+
BUILD_DIR: .
14+
TOKEN: ${{ secrets.TOKEN }}
15+
# BUILD_ONLY: true
16+
build_and_deploy:
17+
runs-on: ubuntu-latest
18+
if: github.ref == 'refs/heads/master'
19+
steps:
20+
- name: 'checkout'
21+
uses: actions/checkout@v4
22+
- name: 'build and deploy'
23+
uses: shalzz/zola-deploy-action@master
24+
env:
25+
PAGES_BRANCH: master
26+
BUILD_DIR: .
27+
TOKEN: ${{ secrets.PUBLIC_TOKEN }}
28+
REPOSITORY: username/username.github.io

0 commit comments

Comments
 (0)