{"id":27547647,"url":"https://github.com/needle-tools/deploy-to-needle-cloud-action","last_synced_at":"2025-04-19T02:53:11.838Z","repository":{"id":285759519,"uuid":"959183756","full_name":"needle-tools/deploy-to-needle-cloud-action","owner":"needle-tools","description":"Automatically deploy your spatial websites to Needle Cloud using Github Actions","archived":false,"fork":false,"pushed_at":"2025-04-04T10:58:18.000Z","size":294,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T14:59:49.561Z","etag":null,"topics":["3d","ar","automatically","ci","continuous","deployment","engine","github","hosting","ios","needle","quicklook","spatial","threejs","usdz","vr","webgl","webxr"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/deploy-to-needle-cloud","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/needle-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-02T11:57:37.000Z","updated_at":"2025-04-11T10:07:19.000Z","dependencies_parsed_at":"2025-04-02T14:49:40.733Z","dependency_job_id":null,"html_url":"https://github.com/needle-tools/deploy-to-needle-cloud-action","commit_stats":null,"previous_names":["needle-tools/deploy-to-needle-cloud-action"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fdeploy-to-needle-cloud-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fdeploy-to-needle-cloud-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fdeploy-to-needle-cloud-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Fdeploy-to-needle-cloud-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/needle-tools","download_url":"https://codeload.github.com/needle-tools/deploy-to-needle-cloud-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249596889,"owners_count":21297457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","ar","automatically","ci","continuous","deployment","engine","github","hosting","ios","needle","quicklook","spatial","threejs","usdz","vr","webgl","webxr"],"created_at":"2025-04-19T02:53:11.372Z","updated_at":"2025-04-19T02:53:11.829Z","avatar_url":"https://github.com/needle-tools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy to Needle Cloud\n\nAutomatically deploy your spatial website to [Needle Cloud](https://cloud.needle.tools) with Github Actions\n\n## Usage\n\n1) [Create an access token](https://cloud.needle.tools/team) on Needle Cloud with `read/write` permissions\n2) Add your access token in a repository secret and name it `NEEDLE_CLOUD_TOKEN`\n3) Create a github workflow, e.g. `.github/workflows/deploy.yml`\n\n*INFO*: For usage with Needle Engine make sure to install `4.4.0-beta.2` *or newer*\n\n## Options\n\n|Input||\n|-|-|\n| `token`| **required**, Needle Cloud access token\n| `name` | deployment name, if no name is provided then the repository name will be used\n| `dir` | root directory of the website files, must contain an `index.html`. If no directory is provided the build directory from `needle.config.json` will be used\n| **Output** | |\n| `url` | URL to the deployed website |\n\n### Example\n```yml\n      - name: Deploy to Needle Cloud\n        uses: needle-tools/deploy-to-needle-cloud-action@v1\n        id: deploy\n        with:\n            token: ${{ secrets.NEEDLE_CLOUD_TOKEN }}\n            name: vite-template\n            dir: ./dist\n```\n\n## Full Example\n\nBuild and deploy vite based project to Needle Cloud. See the full project [here](https://github.com/needle-engine/vite-template).\n\n```yml\nname: Build and Deploy to Needle Cloud\n\non:\n  push:\n    branches: [ main ]\n\njobs:\n  build-and-deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: '20.x'\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      # Build the web project\n      - name: Build web project\n        run: npm run build:production\n        env:\n          NEEDLE_CLOUD_TOKEN: ${{ secrets.NEEDLE_CLOUD_TOKEN }}\n\n      # Deploy to Needle Cloud\n      - name: Deploy to Needle Cloud\n        uses: needle-tools/deploy-to-needle-cloud-action@v1\n        id: deploy\n        with:\n            token: ${{ secrets.NEEDLE_CLOUD_TOKEN }}\n            dir: ./dist\n            # name: vite-template # (optional, using the repository name if not provided)\n        env:\n          NODE_ENV: production\n          NEEDLE_CLOUD_TOKEN: ${{ secrets.NEEDLE_CLOUD_TOKEN }}\n\n      # Display the deployment URL\n      - name: Display deployment URL\n        run: |\n          echo \"::notice title=Deployment URL::Deployed to ${{ steps.deploy.outputs.url }}\"\n\n          # Add to GitHub step summary (appears at bottom of workflow run)\n          echo \"## 🚀 Deployment Summary\" \u003e\u003e $GITHUB_STEP_SUMMARY\n          echo \"Application has been successfully deployed to Needle Cloud!\" \u003e\u003e $GITHUB_STEP_SUMMARY\n          echo \"**Deployment URL:** [${{ steps.deploy.outputs.url }}](${{ steps.deploy.outputs.url }})\" \u003e\u003e $GITHUB_STEP_SUMMARY\n```\n\n# Contact ✒️\n\u003cb\u003e[🌵 Needle](https://needle.tools)\u003c/b\u003e • \n[Github](https://github.com/needle-tools) • \n[Twitter](https://twitter.com/NeedleTools) • \n[Discord](https://discord.needle.tools) • \n[Forum](https://forum.needle.tools) • \n[Youtube](https://www.youtube.com/@needle-tools)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneedle-tools%2Fdeploy-to-needle-cloud-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneedle-tools%2Fdeploy-to-needle-cloud-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneedle-tools%2Fdeploy-to-needle-cloud-action/lists"}