Skip to content

Commit

Permalink
[CI] Migrate intel.github.io/llvm-docs/ to intel/llvm (#15483)
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
uditagarwal97 authored Sep 26, 2024
1 parent 2c0a258 commit 904c2a9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
48 changes: 25 additions & 23 deletions .github/workflows/sycl-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ on:
- '.github/workflows/sycl-docs.yml'
- 'clang/docs/**'
- 'sycl/doc/**'
push:
branches:
- sycl
paths:
- '.github/workflows/sycl-docs.yml'
- 'clang/docs/**'
- 'sycl/doc/**'

permissions: read-all
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
if: github.repository == 'intel/llvm'
steps:
Expand All @@ -35,24 +43,18 @@ jobs:
-s $GITHUB_WORKSPACE/repo -o $GITHUB_WORKSPACE/build -t Release --docs
cmake --build . --target docs-sycl-html
cmake --build . --target docs-clang-html
- name: Deploy
if: ${{ github.event_name == 'schedule' }}
env:
SSH_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
eval "$(ssh-agent -s)"
ssh-add -k ~/.ssh/id_rsa
git clone git@github.com:intel/llvm-docs.git docs
cd $GITHUB_WORKSPACE/docs
git rm -rf .
# Copy the generated docs to a separate directory for uploading.
mkdir $GITHUB_WORKSPACE/install_docs
cd $GITHUB_WORKSPACE/install_docs
mkdir clang
mv $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html/* clang/
touch .nojekyll
yes | \cp -rf $GITHUB_WORKSPACE/build/tools/sycl/doc/html/* .
mv $GITHUB_WORKSPACE/build/tools/clang/docs/html clang/
git config --global user.name "iclsrc"
git config --global user.email "ia.compiler.tools.git@intel.com"
git add .
git diff-index --quiet HEAD || git commit --amend -m "Update docs" -s
git push -f
# Upload the generated docs as an artifact and deploy to GitHub Pages.
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./install_docs
- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'push' }}
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ source project. One of the examples is
Features parity between this project and downstream projects is not guaranteed.

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

### How to use DPC++

Expand Down
2 changes: 1 addition & 1 deletion devops/scripts/sycl-bisect.bash
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ done
if [[ ! -f build/CMakeCache.txt ]]; then
echo "The build directory doesn't seem to be configured yet." >&2
echo "Please run the configure step as documented in sycl/doc/GetStartedGuide.md:" >&2
echo " https://intel.github.io/llvm-docs/GetStartedGuide.html#build-dpc-toolchain" >&2
echo " https://intel.github.io/llvm/GetStartedGuide.html#build-dpc-toolchain" >&2
exit 1
fi

Expand Down

0 comments on commit 904c2a9

Please sign in to comment.