{"id":47754111,"url":"https://github.com/shibayan/swa-deploy","last_synced_at":"2026-04-23T09:03:35.013Z","repository":{"id":348834524,"uuid":"1199178769","full_name":"shibayan/swa-deploy","owner":"shibayan","description":"A GitHub Action to deploy prebuilt frontend assets and Azure Functions APIs to Azure Static Web Apps","archived":false,"fork":false,"pushed_at":"2026-04-22T13:02:05.000Z","size":6031,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-22T15:03:52.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shibayan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T05:40:34.000Z","updated_at":"2026-04-22T13:00:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc96bbf1-64b6-453a-a381-b747cc129541","html_url":"https://github.com/shibayan/swa-deploy","commit_stats":null,"previous_names":["shibayan/swa-deploy"],"tags_count":4,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/shibayan/swa-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibayan%2Fswa-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibayan%2Fswa-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibayan%2Fswa-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibayan%2Fswa-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shibayan","download_url":"https://codeload.github.com/shibayan/swa-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shibayan%2Fswa-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32173068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-03T04:00:37.119Z","updated_at":"2026-04-23T09:03:35.008Z","avatar_url":"https://github.com/shibayan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy Azure Static Web Apps\n\n[![CI](https://github.com/shibayan/swa-deploy/actions/workflows/ci.yml/badge.svg)](https://github.com/shibayan/swa-deploy/actions/workflows/ci.yml)\n![Coverage](./badges/coverage.svg)\n\nA GitHub Action that deploys prebuilt frontend assets, Azure Functions APIs, and\n`staticwebapp.config.json` to\n[Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/).\n\nIt follows the same deployment model as `swa deploy` from the\n[Azure Static Web Apps CLI](https://azure.github.io/static-web-apps-cli/) —\ndownload the `StaticSitesClient` binary, resolve paths, and upload content using\na deployment token. When `deployment-token` is omitted, this action can also\nresolve the token at runtime through Azure Resource Manager after `azure/login`.\nThe binary is cached automatically across workflow runs.\n\n\u003e [!NOTE]\n\u003e This action **does not build** your application. Run your build step before\n\u003e calling this action.\n\n## Usage\n\n### Deploy a built frontend\n\n```yaml\nname: Deploy\n\non:\n  push:\n    branches: [master]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Build\n        run: npm ci \u0026\u0026 npm run build\n\n      - name: Deploy to Azure Static Web Apps\n        id: deploy\n        uses: shibayan/swa-deploy@v1\n        with:\n          app-location: dist\n          deployment-token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}\n\n      - run: echo \"${{ steps.deploy.outputs.deployment-url }}\"\n```\n\n### Deploy with an API\n\n```yaml\n- name: Deploy to Azure Static Web Apps\n  uses: shibayan/swa-deploy@v1\n  with:\n    app-location: dist\n    api-location: api\n    api-language: node\n    environment-name: preview\n    deployment-token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}\n```\n\n### Use azure/login instead of a deployment token\n\n```yaml\npermissions:\n  id-token: write\n  contents: read\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Build\n        run: npm ci \u0026\u0026 npm run build\n\n      - name: Azure login\n        uses: azure/login@v2\n        with:\n          client-id: ${{ secrets.AZURE_CLIENT_ID }}\n          tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n\n      - name: Deploy to Azure Static Web Apps\n        uses: shibayan/swa-deploy@v1\n        with:\n          app-location: dist\n          app-name: my-static-web-app\n          resource-group-name: my-resource-group\n```\n\n## Inputs\n\n| Name                  | Required | Default      | Description                                                                          |\n| --------------------- | -------- | ------------ | ------------------------------------------------------------------------------------ |\n| `app-location`        | No       | `.`          | Directory containing the prebuilt frontend assets                                    |\n| `api-location`        | No       |              | Directory containing the Azure Functions API                                         |\n| `deployment-token`    | No       |              | Deployment token (falls back to `SWA_CLI_DEPLOYMENT_TOKEN` env var)                  |\n| `app-name`            | No       |              | Static Web App name used to resolve a deployment token from Azure Resource Manager   |\n| `resource-group-name` | No       |              | Resource group name for `app-name`; when provided, skips subscription-wide discovery |\n| `environment-name`    | No       | `production` | Target environment — `production`, `preview`, or a custom name                       |\n| `api-language`        | No       |              | API runtime language: `node`, `python`, `dotnet`, or `dotnetisolated`                |\n| `api-version`         | No       |              | API runtime version (defaults are `22` for Node, `3.11` for Python, `8.0` for .NET)  |\n\n## Outputs\n\n| Name             | Description                                                       |\n| ---------------- | ----------------------------------------------------------------- |\n| `deployment-url` | URL reported by `StaticSitesClient` after a successful deployment |\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshibayan%2Fswa-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshibayan%2Fswa-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshibayan%2Fswa-deploy/lists"}