diff --git a/.ci/pre_deploy.bash b/.ci/pre_deploy.bash index 3ef106f8a91d2..78c527ffe20d9 100755 --- a/.ci/pre_deploy.bash +++ b/.ci/pre_deploy.bash @@ -19,8 +19,7 @@ do shift done -# TODO(anyone): remove variable logic when tue-env is updated to new variable names -TUE_ENV_WS_DIR=$(docker exec tue-env bash -c 'source ~/.bashrc; [[ -v TUE_ENV_WS_DIR || ! -v TUE_WS_DIR ]] || TUE_ENV_WS_DIR=${TUE_WS_DIR}; echo "${TUE_ENV_WS_DIR}"' | tr -d '\r') +TUE_ENV_WS_DIR=$(docker exec tue-env bash -c 'source ~/.bashrc; echo "${TUE_ENV_WS_DIR}"' | tr -d '\r') echo -e "\e[35m\e[1mdocker cp tue-env:${TUE_ENV_WS_DIR}/docs .\e[0m" docker cp tue-env:"${TUE_ENV_WS_DIR}"/docs . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2850bb5618da2..180b2f5355bc6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,8 @@ defaults: shell: bash jobs: - deployment: - name: deployment + build: + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 @@ -48,15 +48,26 @@ jobs: - name: Script run: .ci/script.bash - name: Before Deploy - if: ${{ (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }} run: .ci/pre_deploy.bash - - name: Deploy - if: ${{ (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }} - uses: peaceiris/actions-gh-pages@v4 + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: . - destination_dir: . - exclude_assets: '.github,.ci' - enable_jekyll: true - force_orphan: true + path: docs/ + + deploy: + name: Deployment + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + actions: read # To read the artifact from the previous job + id-token: write + pages: write + if: ${{ (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4