Skip to content

Commit 7a8feec

Browse files
authored
📄 [GHA] try rayluo/github-pages-overwriter (#4)
1 parent 075b36d commit 7a8feec

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/github-pages.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
publish:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out
15+
uses: actions/checkout@v4
16+
17+
# - name: Generate your content
18+
# run: echo "Optional placeholder. Put your project's static website generator command here."
19+
20+
- name: Publish current workdir (which contains generated content) to GitHub Pages
21+
uses: rayluo/[email protected]
22+
23+
with:
24+
# You can use whatever directory your project uses,
25+
# for example "wwwroot" (without leading "./").
26+
# Such a directory does *not* have to already exist in your repo,
27+
# it could be an output directory created dynamically
28+
# by your static website builder.
29+
source-directory: trust/public
30+
31+
# Optional. Default value "gh-pages".
32+
# It specifies the temporary branch which hosts the static website.
33+
# Each build will REMOVE this branch and replace it with new content.
34+
# (If you want to keep your old "gh-pages" branch,
35+
# you should define a different target branch for this GPO action to work with.)
36+
target-branch: gh-pages

0 commit comments

Comments
 (0)