diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml deleted file mode 100755 index 41c5901310..0000000000 --- a/.github/workflows/dev-deploy.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: dev-deploy - -on: - push: - branches: [dev] -jobs: - secrets-gate-run: - runs-on: ubuntu-latest - outputs: - ok: ${{ steps.check-secrets-run.outputs.ok }} - steps: - - name: check for secrets needed to run workflows - id: check-secrets-run - run: | - if [ ${{ secrets.DEPLOYMENTS_ENABLED }} == 'true' ]; then - echo "ok=enabled" >> $GITHUB_OUTPUT - fi - secrets-gate-webhook: - runs-on: ubuntu-latest - outputs: - ok: ${{ steps.check-secrets-webhook.outputs.ok }} - steps: - - name: check for secrets needed to run workflows - id: check-secrets-webhook - run: | - if [ ${{ secrets.SEND_FINISHED_WEBHOOK }} == 'true' ]; then - echo "ok=enabled" >> $GITHUB_OUTPUT - fi - dev-deploy: - needs: - - secrets-gate-run - if: ${{ needs.secrets-gate-run.outputs.ok == 'enabled' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.x - - name: Setup Helm - run: scripts/setup_helm_builder.sh - - name: Setup AWS - run: scripts/setup_aws_builder.sh $EKS_AWS_ACCESS_KEY_ID $EKS_AWS_ACCESS_KEY_SECRET $AWS_REGION $CLUSTER_NAME - env: - EKS_AWS_ACCESS_KEY_ID: ${{ secrets.EKS_AWS_ACCESS_KEY_ID }} - EKS_AWS_ACCESS_KEY_SECRET: ${{ secrets.EKS_AWS_ACCESS_KEY_SECRET }} - AWS_REGION: ${{ secrets.AWS_REGION }} - CLUSTER_NAME: ${{ secrets.CLUSTER_NAME }} - - name: Space debug - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - name: move package.json - run: mv package.json package.jsonmoved - - name: npm-install 'cli', @aws-sdk/client-ecr(-public), and @kubernetes/client-node - run: npm install cli @aws-sdk/client-ecr @aws-sdk/client-ecr-public @kubernetes/client-node - - name: restore package.json - run: mv package.jsonmoved package.json - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v2 - - name: Build and Push Docker Image - run: bash scripts/build_docker_builder.sh dev $GITHUB_SHA $AWS_REGION $PRIVATE_REPO - env: - STORAGE_AWS_ACCESS_KEY_ID: ${{ secrets.STORAGE_AWS_ACCESS_KEY_ID }} - STORAGE_AWS_ACCESS_KEY_SECRET: ${{ secrets.STORAGE_AWS_ACCESS_KEY_SECRET }} - REPO_NAME: ${{ secrets.DEV_REPO_NAME }} - AWS_REGION: ${{ secrets.AWS_REGION }} - REPO_URL: ${{ secrets.DEV_REPO_URL }} - REPO_PROVIDER: ${{ secrets.REPO_PROVIDER }} - PRIVATE_REPO: ${{ secrets.PRIVATE_REPO }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} - - name: Deploy to EKS - run: bash scripts/deploy_builder.sh dev $GITHUB_SHA - - name: Job succeeded - if: ${{ needs.secrets-gate-webhook.outputs.ok == 'enabled' }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.6 # Not needed with a .ruby-version file - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - env: - JOB_STATUS: ${{ job.status }} - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - HOOK_OS_NAME: ${{ runner.os }} - WORKFLOW_NAME: ${{ github.workflow }} - run: | - git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook - bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL - shell: bash diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml deleted file mode 100755 index 1539bc63f5..0000000000 --- a/.github/workflows/prod-deploy.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: prod-deploy -on: - push: - branches: - [main] -jobs: - secrets-gate-run: - runs-on: ubuntu-latest - outputs: - ok: ${{ steps.check-secrets-run.outputs.ok }} - steps: - - name: check for secrets needed to run workflows - id: check-secrets-run - run: | - if [ ${{ secrets.DEPLOYMENTS_ENABLED }} == 'true' ]; then - echo "ok=enabled" >> $GITHUB_OUTPUT - fi - secrets-gate-webhook: - runs-on: ubuntu-latest - outputs: - ok: ${{ steps.check-secrets-webhook.outputs.ok }} - steps: - - name: check for secrets needed to run workflows - id: check-secrets-webhook - run: | - if [ ${{ secrets.SEND_FINISHED_WEBHOOK }} == 'true' ]; then - echo "ok=enabled" >> $GITHUB_OUTPUT - fi - prod-deploy: - needs: - - secrets-gate-run - if: ${{ needs.secrets-gate-run.outputs.ok == 'enabled' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.x - - name: Setup Helm - run: scripts/setup_helm_builder.sh - - name: Setup AWS - run: scripts/setup_aws_builder.sh $EKS_AWS_ACCESS_KEY_ID $EKS_AWS_ACCESS_KEY_SECRET $AWS_REGION $CLUSTER_NAME - env: - EKS_AWS_ACCESS_KEY_ID: ${{ secrets.EKS_AWS_ACCESS_KEY_ID }} - EKS_AWS_ACCESS_KEY_SECRET: ${{ secrets.EKS_AWS_ACCESS_KEY_SECRET }} - AWS_REGION: ${{ secrets.AWS_REGION }} - CLUSTER_NAME: ${{ secrets.CLUSTER_NAME }} - - name: Space debug - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - name: move package.json - run: mv package.json package.jsonmoved - - name: npm-install 'cli', @aws-sdk/client-ecr(-public), and @kubernetes/client-node - run: npm install cli @aws-sdk/client-ecr @aws-sdk/client-ecr-public @kubernetes/client-node - - name: restore package.json - run: mv package.jsonmoved package.json - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v2 - - name: Build and Push Docker Image - run: bash scripts/build_docker_builder.sh prod $GITHUB_SHA $AWS_REGION $PRIVATE_REPO - env: - STORAGE_AWS_ACCESS_KEY_ID: ${{ secrets.STORAGE_AWS_ACCESS_KEY_ID }} - STORAGE_AWS_ACCESS_KEY_SECRET: ${{ secrets.STORAGE_AWS_ACCESS_KEY_SECRET }} - REPO_NAME: ${{ secrets.PROD_REPO_NAME }} - AWS_REGION: ${{ secrets.AWS_REGION }} - REPO_URL: ${{ secrets.PROD_REPO_URL }} - REPO_PROVIDER: ${{ secrets.REPO_PROVIDER }} - PRIVATE_REPO: ${{ secrets.PRIVATE_REPO }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} - - name: Deploy to EKS - run: bash scripts/deploy_builder.sh prod $GITHUB_SHA - - name: Job succeeded - if: ${{ needs.secrets-gate-webhook.outputs.ok == 'enabled' }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.6 # Not needed with a .ruby-version file - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - env: - JOB_STATUS: ${{ job.status }} - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - HOOK_OS_NAME: ${{ runner.os }} - WORKFLOW_NAME: ${{ github.workflow }} - run: | - git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook - bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL - shell: bash diff --git a/packages/spatial/src/physics/components/RigidBodyComponent.ts b/packages/spatial/src/physics/components/RigidBodyComponent.ts index 2c0706dd38..9384e3bcdc 100644 --- a/packages/spatial/src/physics/components/RigidBodyComponent.ts +++ b/packages/spatial/src/physics/components/RigidBodyComponent.ts @@ -28,6 +28,7 @@ import { Types } from 'bitecs' import { useEntityContext } from '@etherealengine/ecs' import { defineComponent, + hasComponent, removeComponent, setComponent, useComponent @@ -123,6 +124,7 @@ export const RigidBodyComponent = defineComponent({ component.initialized.set(true) return () => { Physics.removeRigidbody(physicsWorld, entity) + if (!hasComponent(entity, RigidBodyComponent)) return component.initialized.set(false) } }, [physicsWorld])