ci: auto-trigger release on push to release branch #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Visual Report to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install system dependencies (OSMesa for headless rendering) | |
| run: sudo apt-get update && sudo apt-get install -y libosmesa6-dev | |
| - name: Install package with MuJoCo backend | |
| run: pip install -e ".[mujoco]" Pillow | |
| - name: Run MuJoCo grasp example | |
| env: | |
| MUJOCO_GL: osmesa | |
| run: python examples/mujoco_grasp.py --report --output-dir ./harness_output | |
| - name: Build Pages site | |
| run: | | |
| mkdir -p _site | |
| # Copy the HTML report | |
| cp harness_output/report.html _site/index.html | |
| # Copy all checkpoint images (flat structure for easy linking) | |
| for cp_dir in harness_output/mujoco_grasp/trial_001/*/; do | |
| cp_name=$(basename "$cp_dir") | |
| mkdir -p "_site/${cp_name}" | |
| cp "${cp_dir}"*_rgb.png "_site/${cp_name}/" 2>/dev/null || true | |
| cp "${cp_dir}"*_depth_viz.png "_site/${cp_name}/" 2>/dev/null || true | |
| cp "${cp_dir}"metadata.json "_site/${cp_name}/" 2>/dev/null || true | |
| cp "${cp_dir}"state.json "_site/${cp_name}/" 2>/dev/null || true | |
| done | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |