Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .ci/pre_deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
35 changes: 23 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ defaults:
shell: bash

jobs:
deployment:
name: deployment
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -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