Skip to content

Commit 8e4fe10

Browse files
author
nullccxsy
committed
fix ci
1 parent e8c4b52 commit 8e4fe10

File tree

2 files changed

+32
-46
lines changed

2 files changed

+32
-46
lines changed

.asf.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222

2323
github:
2424
description: "Apache Iceberg C++"
25-
homepage: https://iceberg.apache.org/
25+
homepage: https://cpp.iceberg.apache.org/
2626
labels:
2727
- iceberg
2828
- apache
29+
- cpp
2930
enabled_merge_buttons:
3031
merge: false
3132
squash: true
@@ -47,13 +48,11 @@ github:
4748
- raulcd
4849
- wgtmac
4950
- zhjwpku
51+
ghp_branch: gh-pages
52+
ghp_path: /
5053

5154
notifications:
5255
5356
5457
pullrequests: [email protected]
5558
jira_options: link label link label
56-
57-
github:
58-
ghp_branch: main
59-
ghp_path: /mkdocs/site

.github/workflows/docs.yml

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,28 @@
1-
name: Deploy Documentation
1+
name: "Release Docs"
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
78
paths:
89
- 'mkdocs/**'
910
- 'src/**'
10-
pull_request:
11-
branches:
12-
- main
13-
paths:
14-
- 'mkdocs/**'
15-
- 'src/**'
16-
17-
permissions:
18-
contents: read
19-
pages: write
20-
id-token: write
2111

2212
concurrency:
23-
group: "pages"
24-
cancel-in-progress: false
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2515

2616
jobs:
27-
build:
17+
docs:
2818
runs-on: ubuntu-latest
19+
2920
steps:
30-
- name: Checkout
31-
uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 0
3224

33-
- name: Setup Python
34-
uses: actions/setup-python@v4
25+
- uses: actions/setup-python@v6
3526
with:
3627
python-version: '3.11'
3728

@@ -42,37 +33,33 @@ jobs:
4233
sudo apt-get update
4334
sudo apt-get install -y doxygen
4435
45-
- name: Setup Pages
46-
uses: actions/configure-pages@v4
47-
4836
- name: Build API documentation with Doxygen
4937
run: |
5038
cd mkdocs
5139
mkdir -p docs/api
5240
doxygen Doxyfile
41+
echo "Doxygen output created in docs/api/"
5342
54-
- name: Build with MkDocs
43+
- name: Build docs
5544
run: |
5645
cd mkdocs
5746
mkdocs build --clean
47+
echo "MkDocs site built in site/"
5848
59-
- name: Copy CNAME file
49+
- name: Copy
50+
working-directory: ./mkdocs
6051
run: |
61-
cp mkdocs/CNAME mkdocs/site/CNAME
62-
63-
- name: Upload artifact
64-
uses: actions/upload-pages-artifact@v3
65-
with:
66-
path: ./mkdocs/site
52+
echo "Copying site contents to /tmp/site"
53+
cp -r ./site/* /tmp/site/
6754
68-
deploy:
69-
environment:
70-
name: github-pages
71-
url: ${{ steps.deployment.outputs.page_url }}
72-
runs-on: ubuntu-latest
73-
needs: build
74-
if: github.ref == 'refs/heads/main'
75-
steps:
76-
- name: Deploy to GitHub Pages
77-
id: deployment
78-
uses: actions/deploy-pages@v4
55+
- name: Push changes to gh-pages branch
56+
run: |
57+
git checkout --orphan gh-pages-tmp
58+
git rm --quiet -rf .
59+
cp -r /tmp/site/* .
60+
git config --global user.name 'GitHub Actions'
61+
git config --global user.email '[email protected]'
62+
echo "cpp.iceberg.apache.org" > CNAME
63+
git add --all
64+
git commit -m 'Publish C++ docs'
65+
git push -f origin gh-pages-tmp:gh-pages || true

0 commit comments

Comments
 (0)