diff --git a/.github/workflows/sycl-docs.yml b/.github/workflows/sycl-docs.yml index 4a28d18f3201f..5c1e8e425111b 100644 --- a/.github/workflows/sycl-docs.yml +++ b/.github/workflows/sycl-docs.yml @@ -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: @@ -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 + # 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 diff --git a/README.md b/README.md index 8ab5cda1621bb..a60f1e7c96ad6 100644 --- a/README.md +++ b/README.md @@ -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++ diff --git a/devops/scripts/sycl-bisect.bash b/devops/scripts/sycl-bisect.bash index a2fb4d9cc49d0..c3d20b1019484 100755 --- a/devops/scripts/sycl-bisect.bash +++ b/devops/scripts/sycl-bisect.bash @@ -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