From 9fda50e99f423fbabcffd731d524af6243e75abd Mon Sep 17 00:00:00 2001 From: heronimus Date: Fri, 7 Jun 2024 23:15:19 +0700 Subject: [PATCH 01/35] ci: init auto deployment update to railway -- need to fix permission --- .github/workflows/deploy.yaml | 108 ++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..2012464 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,108 @@ +name: Deploy + +## workflow will need manual trigger from actions page +on: + workflow_dispatch: + inputs: + IMAGE_VERSION: + type: string + description: "Cardinal Tag Version:" + default: "vX.X.X" + required: true + RESET_CARDINAL_STATE: + type: boolean + description: "Reset Cardinal DB (Redis)" + default: false + required: true + RESET_NAKAMA_STATE: + type: boolean + description: "Reset Nakama DB (Postgres)" + default: false + required: true + DEPLOY_PROD: + type: boolean + description: "env: PROD" + default: false + required: true + +jobs: + deploy-prod: + name: Deploy Railway + if: ${{ inputs.DEPLOY_PROD }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.IMAGE_VERSION }} + - name: Install Railway CLI + run: | + bash <(curl -fsSL cli.new) + - name: Install Redis-CLI + if: ${{ inputs.RESET_CARDINAL_STATE }} + uses: shogo82148/actions-setup-redis@v1 + with: + redis-version: 7 + auto-start: "false" + - name: Install Postgresql client-only + if: ${{ inputs.RESET_NAKAMA_STATE }} + run: | + sudo apt-get update + sudo apt-get install --yes --no-install-recommends postgresql-client + - name: Cardinal - Shutdown Previous Deployment + working-directory: cardinal + run: | + ## Get Cardinal Latest Deployment ID + DEPLOYMENT_ID=$(curl --location 'https://backboard.railway.app/graphql/v2' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"query deployments($projectId: String!, $environmentId: String!, $serviceId: String!) {\n deployments(\n first: 1\n input: {\n projectId: $projectId\n environmentId: $environmentId\n serviceId: $serviceId\n }\n ) {\n edges {\n node {\n id\n staticUrl\n }\n }\n }\n}", + "variables":{"projectId":"${{ vars.RAILWAY_PROJECT_ID }}","environmentId":"${{ vars.PROD_US_RAILWAY_ENVIRONMENT_ID }}","serviceId":"${{ vars.RAILWAY_CARDINAL_SERVICE_ID }}"}}' | jq -r '.data.deployments.edges[].node.id') + + ## Remove Deployment + curl --location 'https://backboard.railway.app/graphql/v2' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation deploymentRemove($id: String!) {\n deploymentRemove(id: $id)\n}","variables":{"id":"'${DEPLOYMENT_ID}'"}}' + - name: Clear Up Redis + if: ${{ inputs.RESET_CARDINAL_STATE }} + run: | + sleep 10 + redis-cli -h ${{ secrets.PROD_US_REDIS_HOST }} -p ${{ secrets.PROD_US_REDIS_PORT }} < Date: Mon, 10 Jun 2024 20:37:24 +0700 Subject: [PATCH 02/35] ci: add godot export container build --- .github/workflows/build.yaml | 90 +++++++++++++++++++++++++++-------- .github/workflows/deploy.yaml | 18 +++---- 2 files changed, 78 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3b4a5c5..2280871 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Release +name: Build ## workflow will trigger on commit to "main" branch only on: @@ -9,17 +9,16 @@ on: env: GITHUB_REGISTRY_URL: ghcr.io - GITHUB_CONTAINER_NAME: ArcaneReveal/cardinal + GITHUB_CONTAINER_NAME: ${{ github.repository }} GO_VERSION: 1.22.1 jobs: - build: - name: World Engine - Cardinal Build + cardinal: + name: World Engine - Cardinal runs-on: ubuntu-latest defaults: run: shell: bash - working-directory: world-engine # Add "id-token" with the intended permissions. permissions: contents: read @@ -34,10 +33,20 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Set SHA_SHORT outputs - id: vars - run: - echo "sha_short=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT + ## Execute makefile + - name: Run Make + working-directory: world-engine/cardinal + run: make + ## Set Docker metadata + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.GITHUB_REGISTRY_URL }}/${{ env.GITHUB_CONTAINER_NAME }}/cardinal + tags: | + type=ref,event=branch + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} ## Login into GCR / Github Packages - name: Docker - Auth to Github Container Registry uses: docker/login-action@v3 @@ -45,17 +54,56 @@ jobs: registry: ${{ env.GITHUB_REGISTRY_URL }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + ## Push build image to GCR / Github Packages + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ./world-engine/cardinal + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + godot: + name: Godot - HTML Export + runs-on: ubuntu-latest + defaults: + run: + shell: bash + # Add "id-token" with the intended permissions. + permissions: + contents: read + id-token: write + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 ## Execute makefile - - name: Run Make - working-directory: world-engine/cardinal - run: make - ## Build Cardinal dockerfile - - name: Cardinal Build - run: | - # Build container image - # Image name: ghcr.io/FranklinDAO-Dev-Team/ArcaneReveal/cardinal:{sha_hort} - docker build -t ${{ env.GITHUB_REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.GITHUB_CONTAINER_NAME }}:${{ steps.vars.outputs.sha_short }} . + - name: Copy Godot Export HTML data + run: cp -r ./godot/web_export .github/docker-webexport/ + ## Set Docker metadata + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.GITHUB_REGISTRY_URL }}/${{ env.GITHUB_CONTAINER_NAME }}/godotexport + tags: | + type=ref,event=branch + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + ## Login into GCR / Github Packages + - name: Docker - Auth to Github Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.GITHUB_REGISTRY_URL }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} ## Push build image to GCR / Github Packages - - name: Docker - Publish Image to Github Container Registry - run: | - docker push ${{ env.GITHUB_REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.GITHUB_CONTAINER_NAME }}:${{ steps.vars.outputs.sha_short }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: .github/docker-webexport/ + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2012464..4fb0be3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,37 +4,37 @@ name: Deploy on: workflow_dispatch: inputs: - IMAGE_VERSION: + BRANCH_NAME: type: string - description: "Cardinal Tag Version:" - default: "vX.X.X" + description: "Cardinal Branch:" + default: "main" required: true RESET_CARDINAL_STATE: type: boolean description: "Reset Cardinal DB (Redis)" - default: false + default: true required: true RESET_NAKAMA_STATE: type: boolean description: "Reset Nakama DB (Postgres)" - default: false + default: true required: true - DEPLOY_PROD: + DEPLOY_MAIN: type: boolean description: "env: PROD" - default: false + default: true required: true jobs: deploy-prod: name: Deploy Railway - if: ${{ inputs.DEPLOY_PROD }} + if: ${{ inputs.DEPLOY_MAIN }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ inputs.IMAGE_VERSION }} + ref: ${{ inputs.BRANCH_NAME }} - name: Install Railway CLI run: | bash <(curl -fsSL cli.new) From 34fc76d3feac307f30a1886ff72898309ec810fc Mon Sep 17 00:00:00 2001 From: heronimus Date: Mon, 10 Jun 2024 20:38:13 +0700 Subject: [PATCH 03/35] ci: add nginx server for godot build --- .github/docker-webexport/Dockerfile | 12 +++++++ .../docker-webexport/nginx/confd-default.conf | 12 +++++++ .github/docker-webexport/nginx/nginx.conf | 35 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .github/docker-webexport/Dockerfile create mode 100644 .github/docker-webexport/nginx/confd-default.conf create mode 100644 .github/docker-webexport/nginx/nginx.conf diff --git a/.github/docker-webexport/Dockerfile b/.github/docker-webexport/Dockerfile new file mode 100644 index 0000000..906b37a --- /dev/null +++ b/.github/docker-webexport/Dockerfile @@ -0,0 +1,12 @@ +# Runtime +FROM nginx:1.27-alpine AS runtime + +## Copy Nginx config +COPY ./nginx/nginx.conf /etc/nginx/nginx.conf +COPY ./nginx/confd-default.conf /etc/nginx/conf.d/default.conf + +## Copy Godot export html data +COPY ./web_export/ /www/data/ +RUN chmod a+r -R /www/data/ + +RUN mv /www/data/ArcaneReveal.html /www/data/index.html diff --git a/.github/docker-webexport/nginx/confd-default.conf b/.github/docker-webexport/nginx/confd-default.conf new file mode 100644 index 0000000..8490a9c --- /dev/null +++ b/.github/docker-webexport/nginx/confd-default.conf @@ -0,0 +1,12 @@ +## Index Server Directive +server { + listen 80; + absolute_redirect off; + + ## Add Required Godot export header + add_header Access-Control-Allow-Origin "*"; + add_header Cross-Origin-Embedder-Policy "require-corp"; + add_header Cross-Origin-Opener-Policy "same-origin"; + + root /www/data/; +} diff --git a/.github/docker-webexport/nginx/nginx.conf b/.github/docker-webexport/nginx/nginx.conf new file mode 100644 index 0000000..a0622bc --- /dev/null +++ b/.github/docker-webexport/nginx/nginx.conf @@ -0,0 +1,35 @@ +# Optimizing performance for serving content +# See: https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/#optimizing-performance-for-serving-content + +# Optimizing performance for proxy +# See: https://www.tweaked.io/guide/nginx-proxying/ +user nginx; +worker_processes 2; +events { + worker_connections 8096; + multi_accept on; + use epoll; +} +worker_rlimit_nofile 40000; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + # Enable gzip encryption + gzip on; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 30; + types_hash_max_size 2048; + + # Don't expose Nginx version + server_tokens off; + + include /etc/nginx/conf.d/*.conf; +} From 19fe22821c65787c4b8da1918f5e32da03c09780 Mon Sep 17 00:00:00 2001 From: heronimus Date: Mon, 10 Jun 2024 20:39:09 +0700 Subject: [PATCH 04/35] ci: test build --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2280871..82a205e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,9 +3,9 @@ name: Build ## workflow will trigger on commit to "main" branch only on: workflow_dispatch: - push: - branches: - - main + # push: + # branches: + # - main env: GITHUB_REGISTRY_URL: ghcr.io From 049369c8fcacff5e53870dee5a9effb5ae8c7d0e Mon Sep 17 00:00:00 2001 From: heronimus Date: Mon, 10 Jun 2024 20:39:59 +0700 Subject: [PATCH 05/35] ci: test build --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 82a205e..64237ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ name: Build ## workflow will trigger on commit to "main" branch only on: workflow_dispatch: - # push: + push: # branches: # - main From 8730ecd6336856b2ec2b3fe710293d015a2aa7ad Mon Sep 17 00:00:00 2001 From: heronimus Date: Mon, 10 Jun 2024 20:42:25 +0700 Subject: [PATCH 06/35] ci: add debug line to confirm copied web_export --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 64237ef..a2489da 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -81,7 +81,9 @@ jobs: uses: docker/setup-buildx-action@v3 ## Execute makefile - name: Copy Godot Export HTML data - run: cp -r ./godot/web_export .github/docker-webexport/ + run: | + cp -r ./godot/web_export .github/docker-webexport/ + ls -lah .github/docker-webexport/web_export ## Set Docker metadata - name: Docker metadata id: meta From ac8d2a9847c3561947b40070fa8a2f79b2449911 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 21:27:20 +0700 Subject: [PATCH 07/35] fix: auto deployment workflow --- .github/workflows/build.yaml | 1 + .github/workflows/deploy.yaml | 35 ++++++----------------------------- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a2489da..4142088 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,7 @@ name: Build ## workflow will trigger on commit to "main" branch only on: + workflow_call: workflow_dispatch: push: # branches: diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4fb0be3..102625f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -3,49 +3,28 @@ name: Deploy ## workflow will need manual trigger from actions page on: workflow_dispatch: - inputs: - BRANCH_NAME: - type: string - description: "Cardinal Branch:" - default: "main" - required: true - RESET_CARDINAL_STATE: - type: boolean - description: "Reset Cardinal DB (Redis)" - default: true - required: true - RESET_NAKAMA_STATE: - type: boolean - description: "Reset Nakama DB (Postgres)" - default: true - required: true - DEPLOY_MAIN: - type: boolean - description: "env: PROD" - default: true - required: true + push: + branches: + - main jobs: - deploy-prod: + build: + uses: ./.github/workflows/build.yml + deploy: name: Deploy Railway - if: ${{ inputs.DEPLOY_MAIN }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - with: - ref: ${{ inputs.BRANCH_NAME }} - name: Install Railway CLI run: | bash <(curl -fsSL cli.new) - name: Install Redis-CLI - if: ${{ inputs.RESET_CARDINAL_STATE }} uses: shogo82148/actions-setup-redis@v1 with: redis-version: 7 auto-start: "false" - name: Install Postgresql client-only - if: ${{ inputs.RESET_NAKAMA_STATE }} run: | sudo apt-get update sudo apt-get install --yes --no-install-recommends postgresql-client @@ -65,7 +44,6 @@ jobs: --header 'Content-Type: application/json' \ --data '{"query":"mutation deploymentRemove($id: String!) {\n deploymentRemove(id: $id)\n}","variables":{"id":"'${DEPLOYMENT_ID}'"}}' - name: Clear Up Redis - if: ${{ inputs.RESET_CARDINAL_STATE }} run: | sleep 10 redis-cli -h ${{ secrets.PROD_US_REDIS_HOST }} -p ${{ secrets.PROD_US_REDIS_PORT }} < Date: Thu, 13 Jun 2024 22:26:26 +0700 Subject: [PATCH 08/35] fix: deployment build railway --- .../Dockerfile | 0 .../nginx/confd-default.conf | 0 .../nginx/nginx.conf | 0 .github/workflows/build.yaml | 10 +++-- .github/workflows/deploy.yaml | 39 +++++++++++-------- 5 files changed, 28 insertions(+), 21 deletions(-) rename .github/{docker-webexport => docker-godot-webexport}/Dockerfile (100%) rename .github/{docker-webexport => docker-godot-webexport}/nginx/confd-default.conf (100%) rename .github/{docker-webexport => docker-godot-webexport}/nginx/nginx.conf (100%) diff --git a/.github/docker-webexport/Dockerfile b/.github/docker-godot-webexport/Dockerfile similarity index 100% rename from .github/docker-webexport/Dockerfile rename to .github/docker-godot-webexport/Dockerfile diff --git a/.github/docker-webexport/nginx/confd-default.conf b/.github/docker-godot-webexport/nginx/confd-default.conf similarity index 100% rename from .github/docker-webexport/nginx/confd-default.conf rename to .github/docker-godot-webexport/nginx/confd-default.conf diff --git a/.github/docker-webexport/nginx/nginx.conf b/.github/docker-godot-webexport/nginx/nginx.conf similarity index 100% rename from .github/docker-webexport/nginx/nginx.conf rename to .github/docker-godot-webexport/nginx/nginx.conf diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4142088..3a4f119 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,6 +1,6 @@ name: Build -## workflow will trigger on commit to "main" branch only +## workflow will trigger by deploy workflow on main branch on: workflow_call: workflow_dispatch: @@ -48,6 +48,7 @@ jobs: tags: | type=ref,event=branch type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=sha ## Login into GCR / Github Packages - name: Docker - Auth to Github Container Registry uses: docker/login-action@v3 @@ -83,8 +84,8 @@ jobs: ## Execute makefile - name: Copy Godot Export HTML data run: | - cp -r ./godot/web_export .github/docker-webexport/ - ls -lah .github/docker-webexport/web_export + cp -r ./godot/web_export .github/docker-godot-webexport/ + ls -lah .github/docker-godot-webexport/web_export ## Set Docker metadata - name: Docker metadata id: meta @@ -95,6 +96,7 @@ jobs: tags: | type=ref,event=branch type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=sha ## Login into GCR / Github Packages - name: Docker - Auth to Github Container Registry uses: docker/login-action@v3 @@ -106,7 +108,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v5 with: - context: .github/docker-webexport/ + context: .github/docker-godot-webexport/ push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 102625f..78cb233 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -8,8 +8,6 @@ on: - main jobs: - build: - uses: ./.github/workflows/build.yml deploy: name: Deploy Railway runs-on: ubuntu-latest @@ -36,7 +34,7 @@ jobs: --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ --header 'Content-Type: application/json' \ --data '{"query":"query deployments($projectId: String!, $environmentId: String!, $serviceId: String!) {\n deployments(\n first: 1\n input: {\n projectId: $projectId\n environmentId: $environmentId\n serviceId: $serviceId\n }\n ) {\n edges {\n node {\n id\n staticUrl\n }\n }\n }\n}", - "variables":{"projectId":"${{ vars.RAILWAY_PROJECT_ID }}","environmentId":"${{ vars.PROD_US_RAILWAY_ENVIRONMENT_ID }}","serviceId":"${{ vars.RAILWAY_CARDINAL_SERVICE_ID }}"}}' | jq -r '.data.deployments.edges[].node.id') + "variables":{"projectId":"${{ vars.RAILWAY_PROJECT_ID }}","environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","serviceId":"${{ vars.RAILWAY_CARDINAL_SERVICE_ID }}"}}' | jq -r '.data.deployments.edges[].node.id') ## Remove Deployment curl --location 'https://backboard.railway.app/graphql/v2' \ @@ -46,29 +44,26 @@ jobs: - name: Clear Up Redis run: | sleep 10 - redis-cli -h ${{ secrets.PROD_US_REDIS_HOST }} -p ${{ secrets.PROD_US_REDIS_PORT }} < Date: Thu, 13 Jun 2024 22:26:50 +0700 Subject: [PATCH 09/35] debug deployment --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 78cb233..1bd3f3a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,8 +4,8 @@ name: Deploy on: workflow_dispatch: push: - branches: - - main + # branches: + # - main jobs: deploy: From 6b2ad9f39460f8af5bdfdf88674fe32ff1e4ba4d Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 22:29:56 +0700 Subject: [PATCH 10/35] fix: working-directory --- .github/workflows/deploy.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 1bd3f3a..a99b671 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -7,6 +7,9 @@ on: # branches: # - main +env: + GO_VERSION: 1.22.1 + jobs: deploy: name: Deploy Railway @@ -14,6 +17,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Golang + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} - name: Install Railway CLI run: | bash <(curl -fsSL cli.new) @@ -27,7 +34,7 @@ jobs: sudo apt-get update sudo apt-get install --yes --no-install-recommends postgresql-client - name: Cardinal - Shutdown Previous Deployment - working-directory: cardinal + working-directory: world-engine/cardinal run: | ## Get Cardinal Latest Deployment ID DEPLOYMENT_ID=$(curl --location 'https://backboard.railway.app/graphql/v2' \ From 40fae8832981ccaf076f9a5168ccec4e616669b9 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 22:37:50 +0700 Subject: [PATCH 11/35] fix: railway build --- .github/workflows/deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a99b671..03f4019 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -58,7 +58,10 @@ jobs: EOF - name: Cardinal - Run Make working-directory: world-engine/cardinal - run: make + run: | + make + ## includ artifacts directory to Railway build + echo "node_modules" > seismic/circuit/.gitignore - name: Cardinal - Up New Deployment env: RAILWAY_TOKEN: ${{ secrets.PROD_RAILWAY_TOKEN }} From 23e5346eef6a0c9a3602912fb686b68f70836ca6 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 23:11:49 +0700 Subject: [PATCH 12/35] fix: railway docker images commit --- .github/workflows/build.yaml | 2 +- .github/workflows/deploy.yaml | 58 ++++++++++++++++++++--------------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3a4f119..611c260 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ name: Build on: workflow_call: workflow_dispatch: - push: + # push: # branches: # - main diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 03f4019..4a45450 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -7,20 +7,15 @@ on: # branches: # - main -env: - GO_VERSION: 1.22.1 - jobs: + tests: + uses: ./.github/workflows/build.yml deploy: name: Deploy Railway runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Golang - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - name: Install Railway CLI run: | bash <(curl -fsSL cli.new) @@ -33,6 +28,10 @@ jobs: run: | sudo apt-get update sudo apt-get install --yes --no-install-recommends postgresql-client + - name: Get Last Commit Short SHA + id: commit_data + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Cardinal - Shutdown Previous Deployment working-directory: world-engine/cardinal run: | @@ -56,18 +55,37 @@ jobs: FLUSHALL keys * EOF - - name: Cardinal - Run Make - working-directory: world-engine/cardinal - run: | - make - ## includ artifacts directory to Railway build - echo "node_modules" > seismic/circuit/.gitignore - name: Cardinal - Up New Deployment env: RAILWAY_TOKEN: ${{ secrets.PROD_RAILWAY_TOKEN }} - working-directory: world-engine/cardinal run: | - railway up --service Cardinal --environment production + ## remove prev docker image + curl --location 'https://backboard.railway.app/graphql/internal?q=stageEnvironmentChanges' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation stageEnvironmentChanges($environmentId: String!, $payload: EnvironmentConfig!) {\n environmentStageChanges(environmentId: $environmentId, input: $payload) {\n id\n }\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","payload":{"services":{"${{ vars.RAILWAY_CARDINAL_SERVICE_ID }}":{"source":{"image":null}}}}}}' + + sleep 5 + ## commit changes + curl --location 'https://backboard.railway.app/graphql/internal?q=environmentPatchCommitStaged' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation environmentPatchCommitStaged($environmentId: String!, $message: String, $skipDeploys: Boolean) {\n environmentPatchCommitStaged(\n environmentId: $environmentId\n commitMessage: $message\n skipDeploys: $skipDeploys\n )\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","skipDeploys":false}}' + + sleep 5 + ## change new docker image + curl --location 'https://backboard.railway.app/graphql/internal?q=stageEnvironmentChanges' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation stageEnvironmentChanges($environmentId: String!, $payload: EnvironmentConfig!) {\n environmentStageChanges(environmentId: $environmentId, input: $payload) {\n id\n }\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","payload":{"services":{"${{ vars.RAILWAY_CARDINAL_SERVICE_ID }}":{"source":{"image":"ghcr.io/franklindao-dev-team/arcanereveal/cardinal:sha-${{ steps.commit_data.outputs.sha_short }}","repo":null,"branch":null,"upstreamUrl":null},"deploy":{"registryCredentials":{"username":"USERNAME","password":"${{ secrets.RAILWAY_GITHUB_REGISTRY_TOKEN }}"}}}}}}}' + + sleep 5 + ## commit changes + curl --location 'https://backboard.railway.app/graphql/internal?q=environmentPatchCommitStaged' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation environmentPatchCommitStaged($environmentId: String!, $message: String, $skipDeploys: Boolean) {\n environmentPatchCommitStaged(\n environmentId: $environmentId\n commitMessage: $message\n skipDeploys: $skipDeploys\n )\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","skipDeploys":false}}' + - name: Cardinal Healthcheck run: | curl -X POST --max-time 10 --retry 20 --retry-delay 5 --retry-max-time 300 ${{ vars.PROD_CARDINAL_HEALTHCHECK }} -d "{}" @@ -88,13 +106,3 @@ jobs: --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ --header 'Content-Type: application/json' \ --data '{"query":"mutation deploymentRestart($id: String!) {\n deploymentRestart(id: $id)\n}","variables":{"id":"'${DEPLOYMENT_ID}'"}}' - - name: Godot - Copy files - run: | - cp -r ./godot/web_export .github/docker-godot-webexport/ - ls -lah .github/docker-godot-webexport/web_export - - name: Godot - Up New Deployment - env: - RAILWAY_TOKEN: ${{ secrets.PROD_RAILWAY_TOKEN }} - working-directory: .github/docker-godot-webexport/ - run: | - railway up --service ArcaneReveal-client --environment production From 82ffaa863934f09a1fc81b387132cc53072fb7c2 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 23:14:14 +0700 Subject: [PATCH 13/35] fix: filename typo --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4a45450..8ec2e52 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -9,7 +9,7 @@ on: jobs: tests: - uses: ./.github/workflows/build.yml + uses: ./.github/workflows/build.yaml deploy: name: Deploy Railway runs-on: ubuntu-latest From 16ad6e5b408ce50dceec4bf0f61503c8ed757892 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 23:17:54 +0700 Subject: [PATCH 14/35] fix: permission --- .github/workflows/deploy.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 8ec2e52..06c8aee 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -8,8 +8,13 @@ on: # - main jobs: - tests: + build: + name: Build uses: ./.github/workflows/build.yaml + permissions: + contents: read + id-token: write + packages: write deploy: name: Deploy Railway runs-on: ubuntu-latest From 464cfb8ea95830e430a1505c97a15abf74adfe51 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 23:21:18 +0700 Subject: [PATCH 15/35] fix: job dependency --- .github/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 06c8aee..3e1af32 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,6 +18,7 @@ jobs: deploy: name: Deploy Railway runs-on: ubuntu-latest + needs: build steps: - name: Checkout uses: actions/checkout@v4 From b744bc91d17d330924bae1f0b31a1bd4af743e75 Mon Sep 17 00:00:00 2001 From: heronimus Date: Thu, 13 Jun 2024 23:30:32 +0700 Subject: [PATCH 16/35] add: godot client deployment --- .github/workflows/deploy.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3e1af32..0589cb4 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -92,6 +92,37 @@ jobs: --header 'Content-Type: application/json' \ --data '{"query":"mutation environmentPatchCommitStaged($environmentId: String!, $message: String, $skipDeploys: Boolean) {\n environmentPatchCommitStaged(\n environmentId: $environmentId\n commitMessage: $message\n skipDeploys: $skipDeploys\n )\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","skipDeploys":false}}' + - name: Godot Client - Up New Deployment + env: + RAILWAY_TOKEN: ${{ secrets.PROD_RAILWAY_TOKEN }} + run: | + ## remove prev docker image + curl --location 'https://backboard.railway.app/graphql/internal?q=stageEnvironmentChanges' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation stageEnvironmentChanges($environmentId: String!, $payload: EnvironmentConfig!) {\n environmentStageChanges(environmentId: $environmentId, input: $payload) {\n id\n }\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","payload":{"services":{"${{ vars.RAILWAY_GODOT_SERVICE_ID }}":{"source":{"image":null}}}}}}' + + sleep 5 + ## commit changes + curl --location 'https://backboard.railway.app/graphql/internal?q=environmentPatchCommitStaged' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation environmentPatchCommitStaged($environmentId: String!, $message: String, $skipDeploys: Boolean) {\n environmentPatchCommitStaged(\n environmentId: $environmentId\n commitMessage: $message\n skipDeploys: $skipDeploys\n )\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","skipDeploys":false}}' + + sleep 5 + ## change new docker image + curl --location 'https://backboard.railway.app/graphql/internal?q=stageEnvironmentChanges' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation stageEnvironmentChanges($environmentId: String!, $payload: EnvironmentConfig!) {\n environmentStageChanges(environmentId: $environmentId, input: $payload) {\n id\n }\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","payload":{"services":{"${{ vars.RAILWAY_GODOT_SERVICE_ID }}":{"source":{"image":"ghcr.io/franklindao-dev-team/arcanereveal/godotexport:sha-${{ steps.commit_data.outputs.sha_short }}","repo":null,"branch":null,"upstreamUrl":null},"deploy":{"registryCredentials":{"username":"USERNAME","password":"${{ secrets.RAILWAY_GITHUB_REGISTRY_TOKEN }}"}}}}}}}' + + sleep 5 + ## commit changes + curl --location 'https://backboard.railway.app/graphql/internal?q=environmentPatchCommitStaged' \ + --header 'Authorization: Bearer ${{ secrets.RAILWAY_API_TOKEN }}' \ + --header 'Content-Type: application/json' \ + --data '{"query":"mutation environmentPatchCommitStaged($environmentId: String!, $message: String, $skipDeploys: Boolean) {\n environmentPatchCommitStaged(\n environmentId: $environmentId\n commitMessage: $message\n skipDeploys: $skipDeploys\n )\n}","variables":{"environmentId":"${{ vars.PROD_RAILWAY_ENVIRONMENT_ID }}","skipDeploys":false}}' + - name: Cardinal Healthcheck run: | curl -X POST --max-time 10 --retry 20 --retry-delay 5 --retry-max-time 300 ${{ vars.PROD_CARDINAL_HEALTHCHECK }} -d "{}" From 79af945105a66702dc7bd1987856ae038c920ada Mon Sep 17 00:00:00 2001 From: heronimus Date: Fri, 14 Jun 2024 00:44:15 +0700 Subject: [PATCH 17/35] only deploy on main branch --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0589cb4..6fc5299 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,8 +4,8 @@ name: Deploy on: workflow_dispatch: push: - # branches: - # - main + branches: + - main jobs: build: From 7f8e12a5a9000fd5102e95f2b5ab3630e16df099 Mon Sep 17 00:00:00 2001 From: Zile <75930156+ZILECAO@users.noreply.github.com> Date: Fri, 14 Jun 2024 01:01:21 -0400 Subject: [PATCH 18/35] Create static.yml --- .github/workflows/static.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..0b0c4da --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,49 @@ +name: Deploy static content to Pages +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Install dependencies + run: npm install local-web-server + + - name: Change directory and run server + run: | + cd ArcaneReveal/godot/web_export + npx local-web-server --https --cors.embedder-policy "require-corp" --cors.opener-policy "same-origin" --directory "." & + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'ArcaneReveal/godot/web_export' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From fe787b9b2e6b98717ecf29777ad1d22b0cf64bfe Mon Sep 17 00:00:00 2001 From: Zile <75930156+ZILECAO@users.noreply.github.com> Date: Fri, 14 Jun 2024 01:01:36 -0400 Subject: [PATCH 19/35] replace: new export html5 (#98) --- godot/rumble4/scenes/Gama/life_bar.tscn | 4 +-- godot/rumble4/scenes/Gama/spell1.tscn | 4 +-- godot/rumble4/scenes/Gama/testMain.tscn | 2 +- .../rumble4/scenes/Gama/wand_animations.tscn | 17 +++++----- .../rumble4/scenes/TestFinal/displayName.tscn | 11 +++---- godot/rumble4/scenes/TestFinal/username.tscn | 30 ++++++++---------- godot/web_export/ArcaneReveal.html | 2 +- godot/web_export/ArcaneReveal.pck | Bin 6144336 -> 6200464 bytes .../web_export/ArcaneReveal.service.worker.js | 2 +- 9 files changed, 33 insertions(+), 39 deletions(-) diff --git a/godot/rumble4/scenes/Gama/life_bar.tscn b/godot/rumble4/scenes/Gama/life_bar.tscn index c2f445e..e5bfb43 100644 --- a/godot/rumble4/scenes/Gama/life_bar.tscn +++ b/godot/rumble4/scenes/Gama/life_bar.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://cflwrb4c6hj8h"] -[ext_resource type="Texture2D" uid="uid://d36ccqo0lbx8x" path="res://assets/heart2.tres" id="1_e0jun"] -[ext_resource type="Texture2D" uid="uid://y0n3ulw18vla" path="res://assets/heart3.tres" id="2_rix3q"] +[ext_resource type="Texture2D" path="res://assets/heart2.tres" id="1_e0jun"] +[ext_resource type="Texture2D" path="res://assets/heart3.tres" id="2_rix3q"] [sub_resource type="SpriteFrames" id="SpriteFrames_gdfsd"] animations = [{ diff --git a/godot/rumble4/scenes/Gama/spell1.tscn b/godot/rumble4/scenes/Gama/spell1.tscn index 381a41c..2ba4c2a 100644 --- a/godot/rumble4/scenes/Gama/spell1.tscn +++ b/godot/rumble4/scenes/Gama/spell1.tscn @@ -3,12 +3,12 @@ [ext_resource type="PackedScene" uid="uid://dd11hdfpdubc7" path="res://scenes/Gama/wand_animations.tscn" id="1_3bmej"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_dyc6s"] -size = Vector2(358, 51) +size = Vector2(632, 80) [node name="Spell1" type="Area2D"] [node name="WandAnimations" parent="." instance=ExtResource("1_3bmej")] [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(106, 0) +position = Vector2(12, 0) shape = SubResource("RectangleShape2D_dyc6s") diff --git a/godot/rumble4/scenes/Gama/testMain.tscn b/godot/rumble4/scenes/Gama/testMain.tscn index 2482e80..ccd881c 100644 --- a/godot/rumble4/scenes/Gama/testMain.tscn +++ b/godot/rumble4/scenes/Gama/testMain.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://dgvad04ku3mdt"] +[gd_scene load_steps=12 format=3 uid="uid://dc6jw4arwneon"] [ext_resource type="Script" path="res://scripts/NakamaClient.gd" id="1_kqd0p"] [ext_resource type="Texture2D" uid="uid://gc1vmy2ygaye" path="res://assets/TX Tileset Grass.png" id="2_vpu8v"] diff --git a/godot/rumble4/scenes/Gama/wand_animations.tscn b/godot/rumble4/scenes/Gama/wand_animations.tscn index 6546b13..389818a 100644 --- a/godot/rumble4/scenes/Gama/wand_animations.tscn +++ b/godot/rumble4/scenes/Gama/wand_animations.tscn @@ -112,13 +112,13 @@ animations = [{ [node name="WandAnimations" type="Node2D"] [node name="LightningStrikeRight" type="AnimatedSprite2D" parent="."] -visible = false z_index = 1 +position = Vector2(1, -37) rotation = 1.5708 scale = Vector2(2, 0.913) sprite_frames = SubResource("SpriteFrames_68x3c") animation = &"play" -frame = 5 +frame = 6 frame_progress = 1.0 [node name="ColorRect" type="ColorRect" parent="LightningStrikeRight"] @@ -130,13 +130,13 @@ offset_bottom = 409.979 color = Color(1, 1, 1, 0.0627451) [node name="LightningStrikeLeft" type="AnimatedSprite2D" parent="."] -visible = false z_index = 1 +position = Vector2(-1, -37) rotation = -1.5708 scale = Vector2(2, 0.913) sprite_frames = SubResource("SpriteFrames_68x3c") animation = &"play" -frame = 5 +frame = 6 frame_progress = 1.0 [node name="ColorRect" type="ColorRect" parent="LightningStrikeLeft"] @@ -150,9 +150,9 @@ metadata/_edit_use_anchors_ = true [node name="LightningStrikeTop" type="AnimatedSprite2D" parent="."] z_index = 1 -position = Vector2(68, -8) +position = Vector2(-1, -37) rotation = 4.71239 -scale = Vector2(0.997808, 0.519958) +scale = Vector2(2, 0.913) sprite_frames = SubResource("SpriteFrames_68x3c") animation = &"play" frame = 6 @@ -168,13 +168,13 @@ color = Color(1, 1, 1, 0.0627451) metadata/_edit_use_anchors_ = true [node name="LightningStrikeBottom" type="AnimatedSprite2D" parent="."] -visible = false z_index = 1 +position = Vector2(-1, -37) rotation = 4.71239 scale = Vector2(2, 0.913) sprite_frames = SubResource("SpriteFrames_68x3c") animation = &"play" -frame = 5 +frame = 6 frame_progress = 1.0 [node name="ColorRect" type="ColorRect" parent="LightningStrikeBottom"] @@ -195,6 +195,7 @@ frame = 5 frame_progress = 1.0 [node name="Explosion" type="AnimatedSprite2D" parent="."] +position = Vector2(-1.00002, -2.38419e-07) scale = Vector2(0.224545, 0.222727) sprite_frames = SubResource("SpriteFrames_akqiw") animation = &"play" diff --git a/godot/rumble4/scenes/TestFinal/displayName.tscn b/godot/rumble4/scenes/TestFinal/displayName.tscn index 813ffc9..8f1953f 100644 --- a/godot/rumble4/scenes/TestFinal/displayName.tscn +++ b/godot/rumble4/scenes/TestFinal/displayName.tscn @@ -1,10 +1,7 @@ [gd_scene format=3 uid="uid://crj3frg7lk5vw"] [node name="UsernameLabel" type="Label"] -anchors_preset = -1 -anchor_left = 0.047 -anchor_right = 0.047 -offset_left = -44.6 -offset_top = 320.0 -offset_right = -43.6 -offset_bottom = 343.0 +offset_left = 88.0 +offset_top = 369.0 +offset_right = 89.0 +offset_bottom = 392.0 diff --git a/godot/rumble4/scenes/TestFinal/username.tscn b/godot/rumble4/scenes/TestFinal/username.tscn index 3fbcecd..6193242 100644 --- a/godot/rumble4/scenes/TestFinal/username.tscn +++ b/godot/rumble4/scenes/TestFinal/username.tscn @@ -1,42 +1,38 @@ -[gd_scene load_steps=3 format=3 uid="uid://d0e5fjc8u3vsm"] +[gd_scene load_steps=2 format=3 uid="uid://d0e5fjc8u3vsm"] [ext_resource type="Script" path="res://scenes/TestFinal/username.gd" id="1_67vwy"] -[ext_resource type="FontFile" uid="uid://dkpgehj8g2ats" path="res://scenes/TestFinal/PressStart2P.ttf" id="2_1tfj7"] [node name="Username" type="Control"] layout_mode = 3 anchors_preset = 0 -offset_left = 44.0 -offset_top = 75.0 -offset_right = 44.0 -offset_bottom = 75.0 +offset_left = 56.0 +offset_top = 72.0 +offset_right = 56.0 +offset_bottom = 72.0 script = ExtResource("1_67vwy") [node name="ColorRect" type="ColorRect" parent="."] layout_mode = 0 -offset_left = 234.0 +offset_left = 195.0 offset_top = -32.0 -offset_right = 363.0 +offset_right = 294.0 offset_bottom = 31.0 scale = Vector2(-2.0642, 2.25758) color = Color(0.352941, 0.352941, 0.352941, 1) [node name="TextEdit" type="TextEdit" parent="."] layout_mode = 0 -offset_left = -8.0 -offset_right = 209.0 -offset_bottom = 33.0 -theme_override_fonts/font = ExtResource("2_1tfj7") -theme_override_font_sizes/font_size = 16 +offset_right = 184.0 +offset_bottom = 40.0 placeholder_text = "Enter Persona" [node name="Button" type="Button" parent="."] modulate = Color(0.117647, 0.905882, 1, 1) layout_mode = 0 -offset_left = 45.0 -offset_top = 54.0 -offset_right = 149.0 -offset_bottom = 85.0 +offset_left = 64.0 +offset_top = 56.0 +offset_right = 128.0 +offset_bottom = 87.0 text = "Submit " diff --git a/godot/web_export/ArcaneReveal.html b/godot/web_export/ArcaneReveal.html index aa6c444..8a83287 100644 --- a/godot/web_export/ArcaneReveal.html +++ b/godot/web_export/ArcaneReveal.html @@ -138,7 +138,7 @@