Merge pull request #1860 from StanfordVL/fix/doc #119
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: Build and deploy BEHAVIOR website | |
| on: | |
| schedule: | |
| - cron: "0 10 * * *" # Every day at 10am | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| jobs: | |
| build: | |
| runs-on: [self-hosted, linux] | |
| defaults: | |
| run: | |
| shell: micromamba run -n omnigibson /bin/bash -leo pipefail {0} | |
| steps: | |
| - name: Fix home | |
| run: echo "HOME=/root" >> $GITHUB_ENV | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Install BDDL | |
| working-directory: bddl | |
| run: pip install -e . | |
| - name: Install | |
| working-directory: OmniGibson | |
| run: pip install -e .[dev] | |
| - name: Build docs | |
| run: mkdocs build # TODO: Shouldn't we copy over the src directory here? | |
| # # See if we need to rebuild the whole thing | |
| # - name: Get BDDL hash | |
| # id: bddl-hash | |
| # working-directory: bddl | |
| # run: echo hash=$(git rev-parse HEAD) >> "$GITHUB_OUTPUT" | |
| # - name: Get knowledgebase hash | |
| # id: website-hash | |
| # working-directory: knowledgebase | |
| # run: echo hash=$(git rev-parse HEAD) >> "$GITHUB_OUTPUT" | |
| # - name: Check cache for overall data | |
| # id: cache-knowledgebase | |
| # uses: actions/cache@v3 | |
| # with: | |
| # key: knowledgebase-${{ steps.website-hash.outputs.hash }}-${{ steps.bddl-hash.outputs.hash }} | |
| # path: README.md | |
| # lookup-only: true | |
| # - if: ${{ steps.cache-knowledgebase.outputs.cache-hit != 'true' }} | |
| - name: Install other dependencies | |
| working-directory: knowledgebase | |
| run: pip install -r requirements.txt | |
| # - if: ${{ steps.cache-knowledgebase.outputs.cache-hit != 'true' }} | |
| - name: Generate static knowledgebase site | |
| working-directory: knowledgebase | |
| run: python build_static_site.py | |
| - name: Move knowledgebase to combined site | |
| run: cp -R knowledgebase/build/knowledgebase site | |
| - name: Upload pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site/ | |
| # Deploy on github pages | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |