{"id":26466678,"url":"https://github.com/aaronpanch/action-serverless","last_synced_at":"2025-03-19T12:36:16.594Z","repository":{"id":48087037,"uuid":"169907692","full_name":"aaronpanch/action-serverless","owner":"aaronpanch","description":"GitHub Action for interacting with the Serverless CLI","archived":false,"fork":false,"pushed_at":"2022-11-14T18:34:55.000Z","size":9,"stargazers_count":36,"open_issues_count":4,"forks_count":45,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-15T01:21:45.695Z","etag":null,"topics":["deployment","github-actions","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/aaronpanch.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}},"created_at":"2019-02-09T19:59:18.000Z","updated_at":"2023-01-04T21:41:36.000Z","dependencies_parsed_at":"2023-01-11T17:23:04.232Z","dependency_job_id":null,"html_url":"https://github.com/aaronpanch/action-serverless","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpanch%2Faction-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpanch%2Faction-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpanch%2Faction-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronpanch%2Faction-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronpanch","download_url":"https://codeload.github.com/aaronpanch/action-serverless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244429147,"owners_count":20451423,"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":["deployment","github-actions","serverless","serverless-framework"],"created_at":"2025-03-19T12:36:15.998Z","updated_at":"2025-03-19T12:36:16.588Z","avatar_url":"https://github.com/aaronpanch.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action for Serverless\n\nThis Action wraps the [Serverless Framework](https://serverless.com/framework/docs/getting-started/) CLI to enable common commands. See their documentation for usage and provider selection.\n\n## Usage\n\nYou'll first have to have a Serverless project as outlined in Serverless's [Getting Started](https://serverless.com/framework/docs/getting-started/).  Suppose your provider of choice were Amazon AWS. A workflow could look as follows to install dependencies, and deploy to a Lambda function.\n\n_Note:_ We're first using the NPM Action to install project dependencies, then running `serverless deploy` via the action.\n\n```workflow\nworkflow \"Deploy via Serverless\" {\n  on = \"push\"\n  resolves = [\"deploy\"]\n}\n\naction \"install\" {\n  uses = \"actions/npm@master\"\n  args = \"install\"\n}\n\naction \"deploy\" {\n  needs = [\"install\"]\n  uses = \"aaronpanch/action-serverless@master\"\n  args = \"deploy\"\n  secrets = [\n    \"AWS_ACCESS_KEY_ID\",\n    \"AWS_SECRET_ACCESS_KEY\",\n  ]\n}\n```\n\n### Secrets\n\nDepending on the Serverless provider chosen, you'll need to supply appropriate credentials.  The above example illustrates a typical AWS scenario, but Serverless supports other cloud providers.\n\nTypically, with any cloud provider, their particular authentication environment params are **Required**.\n\n### Environment Variables\n\n- `SERVICE_ROOT` - **Optional**.  To specify a particular subdirectory of your project that contains the Serverless service (the directory with the `serverless.yml` file) you can specify a `SERVICE_ROOT`.  This action will `cd` into that directory then execute commands.  The default root is `.` (project root).\n\n#### Example\n\nTo navigate and deploy two services (in this example \"Users\" and \"Admins\") in different subdirectories:\n\n```hcl\naction \"Deploy Users Service\" {\n  uses = \"aaronpanch/action-serverless@master\"\n  args = \"deploy\"\n  env = {\n    SERVICE_ROOT = \"users_service\"\n  }\n  secrets = [\n    \"AWS_ACCESS_KEY_ID\",\n    \"AWS_SECRET_ACCESS_KEY\",\n  ]\n}\n\naction \"Deploy Admin Service\" {\n  uses = \"aaronpanch/action-serverless@master\"\n  args = \"deploy\"\n  env = {\n    SERVICE_ROOT = \"admin_service\"\n  }\n  secrets = [\n    \"AWS_ACCESS_KEY_ID\",\n    \"AWS_SECRET_ACCESS_KEY\",\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronpanch%2Faction-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronpanch%2Faction-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronpanch%2Faction-serverless/lists"}