mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 04:13:57 +08:00
Maintain a viewer version (#347)
* initial commit * starting deploy script * filename update * requirements * file * branch name * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * lazy commit * Update viewer_build_deploy.yml * reading version from package json * still deploy to branches * update version
This commit is contained in:
1 parent
adf249b3cd
commit
16d02d4c21
5 files changed
+176
-12
No files matched your search
@@ -46,6 +46,16 @@ jobs:
|
||||
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 ./nerfactory/viewer/app/requirements.txt
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
@@ -62,14 +72,27 @@ jobs:
|
||||
shell: bash
|
||||
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
|
||||
|
||||
- run: mkdir ~/.ssh
|
||||
- run: 'echo "$SSH_KEY" >> ~/.ssh/github_actions_user_key_filename'
|
||||
- run: chmod 400 ~/.ssh/github_actions_user_key_filename
|
||||
- run: echo -e "Host github_action_remote_machine\n\tUser eweb0124\n\tHostname 34.102.68.79\n\tIdentityFile ~/.ssh/github_actions_user_key_filename\n\tStrictHostKeyChecking No" >> ~/.ssh/config
|
||||
- run: ssh github_action_remote_machine 'rm -rf /home/eweb0124/build'
|
||||
# ${{ env.BRANCH_NAME }} is the branch name
|
||||
- run: ssh github_action_remote_machine 'mkdir -p /home/eweb0124/viewer/branch/${{ env.BRANCH_NAME }}'
|
||||
- run: ssh github_action_remote_machine 'rm -rf /home/eweb0124/viewer/branch/${{ env.BRANCH_NAME }}'
|
||||
- run: scp -r ./nerfactory/viewer/app/build github_action_remote_machine:/home/eweb0124/
|
||||
# TODO(ethan): move the current version to an older folder
|
||||
- run: ssh github_action_remote_machine 'mv /home/eweb0124/build /home/eweb0124/viewer/branch/${{ env.BRANCH_NAME }}'
|
||||
# TODO: detect file or scheme changes of the viewer 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: nerfactory/viewer/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 ./nerfactory/viewer/app/run_deploy.py \
|
||||
--branch-name ${{ env.BRANCH_NAME }} \
|
||||
--ssh-key-string "$SSH_KEY" \
|
||||
--local-folder ./nerfactory/viewer/app/build \
|
||||
--package-json-filename ./nerfactory/viewer/app/package.json \
|
||||
--increment-version "False"
|
||||
- run: cat ~/.ssh/config
|
||||
Reference in new issue
Block a user