Add preliminary EyefulTower dataset support (#2672) #5425
This file contains 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: Viewer Build and Deploy. | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./nerfstudio/viewer_legacy/app | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 17.8.0 | |
cache: 'yarn' | |
cache-dependency-path: ./nerfstudio/viewer_legacy/app/yarn.lock | |
- name: Install packages | |
run: yarn install | |
- name: Build project | |
run: CI=false yarn build | |
- name: Upload production-ready build files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: production-files | |
path: ./nerfstudio/viewer_legacy/app/build | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
SSH_KEY: ${{secrets.SSH_KEY}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8.12' | |
- name: Install dependencies | |
run: | | |
pip install -r ./nerfstudio/viewer_legacy/app/requirements.txt | |
- name: Download artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: production-files | |
path: ./nerfstudio/viewer_legacy/app/build | |
- name: Get branch name (merge) | |
if: github.event_name != 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | |
- name: Get branch name (pull request) | |
if: github.event_name == 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV | |
# TODO: detect file or scheme changes of the viewer_legacy and only | |
# increment the version.txt file when there is a change. | |
# Update the version.txt code and push to master when things change. | |
# https://github.com/marketplace/actions/changed-files | |
# - name: Run changed-files with defaults on the dir1 | |
# id: changed-files-for-dir1 | |
# uses: tj-actions/changed-files@v29.0.3 | |
# with: | |
# path: nerfstudio/viewer_legacy/app | |
# - name: List all added files in dir1 | |
# run: | | |
# for file in ${{ steps.changed-files-for-dir1.outputs.modified_files }}; do | |
# echo "$file was modified" | |
# done | |
- run: | | |
python ./nerfstudio/viewer_legacy/app/run_deploy.py \ | |
--branch-name ${{ env.BRANCH_NAME }} \ | |
--ssh-key-string "$SSH_KEY" \ | |
--local-folder ./nerfstudio/viewer_legacy/app/build \ | |
--package-json-filename ./nerfstudio/viewer_legacy/app/package.json \ | |
--increment-version "False" | |
- run: cat ~/.ssh/config |