Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit de81246

Browse files
Create publish.yml
1 parent 00135e0 commit de81246

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/publish.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/main'
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/main'
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)