Skip to content

Commit 904c2a9

Browse files
[CI] Migrate intel.github.io/llvm-docs/ to intel/llvm (#15483)
Follow up of #15482 This PR enables hosting [intel.github.io/llvm-docs/ ](intel.github.io/llvm-docs/) website from intel/llvm. Generated docs will be uploaded as an artifact and will be used to host GH page (https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow). The new URL of the website will be **intel.github.io/llvm/** Example: https://uditagarwal97.github.io/llvm/
1 parent 2c0a258 commit 904c2a9

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

.github/workflows/sycl-docs.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@ on:
1010
- '.github/workflows/sycl-docs.yml'
1111
- 'clang/docs/**'
1212
- 'sycl/doc/**'
13+
push:
14+
branches:
15+
- sycl
16+
paths:
17+
- '.github/workflows/sycl-docs.yml'
18+
- 'clang/docs/**'
19+
- 'sycl/doc/**'
1320

14-
permissions: read-all
21+
permissions:
22+
contents: read
23+
pages: write
24+
id-token: write
1525

1626
jobs:
1727
build:
18-
permissions:
19-
contents: write # for Git to git push
2028
runs-on: ubuntu-latest
2129
if: github.repository == 'intel/llvm'
2230
steps:
@@ -35,24 +43,18 @@ jobs:
3543
-s $GITHUB_WORKSPACE/repo -o $GITHUB_WORKSPACE/build -t Release --docs
3644
cmake --build . --target docs-sycl-html
3745
cmake --build . --target docs-clang-html
38-
- name: Deploy
39-
if: ${{ github.event_name == 'schedule' }}
40-
env:
41-
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
42-
run: |
43-
mkdir -p ~/.ssh
44-
echo "$SSH_KEY" > ~/.ssh/id_rsa
45-
chmod 600 ~/.ssh/id_rsa
46-
eval "$(ssh-agent -s)"
47-
ssh-add -k ~/.ssh/id_rsa
48-
git clone [email protected]:intel/llvm-docs.git docs
49-
cd $GITHUB_WORKSPACE/docs
50-
git rm -rf .
46+
# Copy the generated docs to a separate directory for uploading.
47+
mkdir $GITHUB_WORKSPACE/install_docs
48+
cd $GITHUB_WORKSPACE/install_docs
49+
mkdir clang
50+
mv $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
51+
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html/* clang/
5152
touch .nojekyll
52-
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
53-
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html clang/
54-
git config --global user.name "iclsrc"
55-
git config --global user.email "[email protected]"
56-
git add .
57-
git diff-index --quiet HEAD || git commit --amend -m "Update docs" -s
58-
git push -f
53+
# Upload the generated docs as an artifact and deploy to GitHub Pages.
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: ./install_docs
58+
- name: Deploy to GitHub Pages
59+
if: ${{ github.event_name == 'push' }}
60+
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ source project. One of the examples is
4242
Features parity between this project and downstream projects is not guaranteed.
4343

4444
Project documentation is available at:
45-
[DPC++ Documentation](https://intel.github.io/llvm-docs/).
45+
[DPC++ Documentation](https://intel.github.io/llvm/).
4646

4747
### How to use DPC++
4848

devops/scripts/sycl-bisect.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ done
118118
if [[ ! -f build/CMakeCache.txt ]]; then
119119
echo "The build directory doesn't seem to be configured yet." >&2
120120
echo "Please run the configure step as documented in sycl/doc/GetStartedGuide.md:" >&2
121-
echo " https://intel.github.io/llvm-docs/GetStartedGuide.html#build-dpc-toolchain" >&2
121+
echo " https://intel.github.io/llvm/GetStartedGuide.html#build-dpc-toolchain" >&2
122122
exit 1
123123
fi
124124

0 commit comments

Comments
 (0)