{"id":24208581,"url":"https://github.com/aasmal97/deploy-static-app-to-aws","last_synced_at":"2026-05-02T08:32:30.446Z","repository":{"id":64420484,"uuid":"575650254","full_name":"aasmal97/deploy-static-app-to-aws","owner":"aasmal97","description":"This Github Action deploys a static (SPA, SSG or single HTML File) application, to an S3 bucket, and then invalidates the Cloudfront cache so changes are quickly seen","archived":false,"fork":false,"pushed_at":"2025-04-28T05:13:57.000Z","size":387,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T09:47:40.678Z","etag":null,"topics":["aws","aws-s3","cloudfront","deployment","github-actions","single-page-application","static-site","static-site-generator","utilities"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/deploy-static-app-to-aws","language":"TypeScript","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/aasmal97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["aasmal97"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"arkyasmal","thanks_dev":null,"custom":null}},"created_at":"2022-12-08T01:48:14.000Z","updated_at":"2025-04-28T05:12:33.000Z","dependencies_parsed_at":"2025-01-03T06:26:15.033Z","dependency_job_id":"ddb5c020-8b94-4991-bd53-5a6e1d73badf","html_url":"https://github.com/aasmal97/deploy-static-app-to-aws","commit_stats":{"total_commits":46,"total_committers":1,"mean_commits":46.0,"dds":0.0,"last_synced_commit":"a80fca9c28af2031d7c6cd969cb4efde0ec55912"},"previous_names":["aasmal97/deploy-static-site-to-aws","aasmal97/deploy-static-app-to-aws","aasmal97/deploy-react-app-to-aws"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/aasmal97/deploy-static-app-to-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aasmal97%2Fdeploy-static-app-to-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aasmal97%2Fdeploy-static-app-to-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aasmal97%2Fdeploy-static-app-to-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aasmal97%2Fdeploy-static-app-to-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aasmal97","download_url":"https://codeload.github.com/aasmal97/deploy-static-app-to-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aasmal97%2Fdeploy-static-app-to-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32528223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aws","aws-s3","cloudfront","deployment","github-actions","single-page-application","static-site","static-site-generator","utilities"],"created_at":"2025-01-14T01:17:32.434Z","updated_at":"2026-05-02T08:32:30.417Z","avatar_url":"https://github.com/aasmal97.png","language":"TypeScript","funding_links":["https://github.com/sponsors/aasmal97","https://buymeacoffee.com/arkyasmal","https://www.buymeacoffee.com/arkyasmal"],"categories":[],"sub_categories":[],"readme":"# Deploy Static Site To AWS\n\nDeploys a static app (SPA, SSG or static pages) to an S3 bucket and then invalidates the Cloudfront cache for that bucket, so changes are quickly seen.\n\nThis action is useful to deploy:\n\n- [Single Page Applications (SPA)](https://en.wikipedia.org/wiki/Single-page_application)\n- [Staticly Generated Sites/Applications using SSG](https://en.wikipedia.org/wiki/Static_site_generator)\n- [Simple Static HTML pages](https://en.wikipedia.org/wiki/Static_web_page)\n\n\n\u003cbr/\u003e\n\u003ca href=\"https://www.buymeacoffee.com/arkyasmal\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n# How to Use:\n\nBelow is an example\n\n```yaml\nname: Deploy To AWS\nuses: aasmal97/deploy-static-app-to-aws@v2.0.0\nwith:\n  aws_region: us-east-1\n  aws_access_key_id: ${{ secrets.access_key_id }}\n  aws_secret_access_key: ${{ secrets.secret_key }}\n  cloudfront_distribution_id: ${{ secrets.distribution_id }}\n  bucket_name: ${{ secrets.bucket_name }}\n  app_secrets: ${{toJson(secrets)}}\n  node_verison: 20\n  path_to_app: ./\n  env_file_name: local\n  secrets_prefix: \"REACT_APP.*\"\n```\n\n# Inputs:\n\n- `aws_region`: The region your cloudfront distribution and s3 bucket are initated/setup in.\n- `aws_access_key_id`: An AWS user's or role's access key id. This is needed for AWS authentication.\n- `aws_secret_access_key`: An AWS user's or role's secret key. This is needed for AWS authentication.\n- `cloudfront_distribution_id`: The cloudfront distribution id that needs to be invalidated since it is hosting the S3 bucket\n- `bucket_name`: the S3 bucket name that the static app will be deployed to\n- `app_secrets`: A stringified object that contains secrets, that will be passed prior to the build step\n- `node_verison`: Node JS version that the app will run in. By default this is set to 16\n- `path_to_app`: This is the relative path from your root, where the app's `package.json` config file is located.\n- `build_dir`: The relative path from the `CURRENT WORKING DIRECTORY (cwd)`, to the build directory. This directory will be uploaded into AWS S3. By default it is `./build`\n- `secrets_prefix`: A regex pattern applied to environment variable names, that determines if they are loaded into a `.env` file or not\n- `env_file_name`: The name of the generated `.env` file that will will be generated prior to initiating the build command. By default, it is `.env`\n- `destination_path`: The **ABSOLUTE PATH**, that you want the .env file to be generated in. By default, it is the **nearest** package.json to the resolved `path_to_app` directory, or if no `package.json` exists, the `path_to_app` directory itself.\n\n# Requirements:\nEnsure that the following requirements are met.\n\n- Your build script can be called by using `npm run build`\n- Your build script outputs a folder with all built files, located in the `build_dir`\n- Note: All files in your `build_dir` will be uploaded to your s3 bucket.\n\nNote: This action only deploys STATIC sites to AWS. For server-side rendered (SSR) applications, a different workflow is needed, as Cloudfront is a live server environment. For these applications, tools like Render, AWS Amplify, or AWS EC2 are good alternatives\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faasmal97%2Fdeploy-static-app-to-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faasmal97%2Fdeploy-static-app-to-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faasmal97%2Fdeploy-static-app-to-aws/lists"}