Skip to content

Commit 2b21a0f

Browse files
Copilotsunshineg
andauthored
Fix ossheroes Hexo site deployment to gh-pages (#83)
* Initial plan * Fix ossheroes deployment and YAML config issue Co-authored-by: sunshineg <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: sunshineg <[email protected]>
1 parent 7347768 commit 2b21a0f

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,24 @@ jobs:
2222
- uses: actions/setup-node@v4
2323
with:
2424
node-version: '20'
25-
- run: |
25+
- name: Build main site
26+
run: |
2627
npm install
2728
npm run build
29+
- name: Build ossheroes site
30+
run: |
31+
if [ ! -d ossheroes ]; then
32+
echo "Error: ossheroes directory not found"
33+
exit 1
34+
fi
35+
cd ossheroes
36+
npm install
37+
npm run build
38+
if [ ! -d public ]; then
39+
echo "Error: ossheroes/public directory not created"
40+
exit 1
41+
fi
42+
cp -r public ../dist/ossheroes
2843
- name: Deploy 🚀
2944
uses: JamesIves/github-pages-deploy-action@v4
3045
with:

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
dist/
6+
7+
# Lock files
8+
package-lock.json

ossheroes/_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ timezone: ''
1313

1414
# URL
1515
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
16-
url: # 在 _config.yml 中添加/修改:
1716
url: https://opensource.win/ossheroes
1817
permalink: :slug/
1918
permalink_defaults:

0 commit comments

Comments
 (0)