{"id":19952997,"url":"https://github.com/dfanso/s3-static-web-deploy","last_synced_at":"2026-05-11T08:37:25.858Z","repository":{"id":250196886,"uuid":"804830320","full_name":"DFanso/s3-static-web-deploy","owner":"DFanso","description":"deploy static web site using AWS s3, CloudFront and CI/CD using Git actions","archived":false,"fork":false,"pushed_at":"2024-07-25T17:51:19.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T06:27:23.270Z","etag":null,"topics":["aws","cloudfront","devops","s3-website"],"latest_commit_sha":null,"homepage":"https://dpusuzb6qlc4y.cloudfront.net/","language":"CSS","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/DFanso.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}},"created_at":"2024-05-23T11:00:59.000Z","updated_at":"2024-07-25T17:51:22.000Z","dependencies_parsed_at":"2024-07-25T20:48:55.332Z","dependency_job_id":"f01d9fd3-a111-4c0e-95ee-e29ec0c42755","html_url":"https://github.com/DFanso/s3-static-web-deploy","commit_stats":null,"previous_names":["dfanso/s3-static-web-deploy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DFanso%2Fs3-static-web-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DFanso%2Fs3-static-web-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DFanso%2Fs3-static-web-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DFanso%2Fs3-static-web-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DFanso","download_url":"https://codeload.github.com/DFanso/s3-static-web-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241381648,"owners_count":19953752,"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":["aws","cloudfront","devops","s3-website"],"created_at":"2024-11-13T01:15:00.472Z","updated_at":"2026-05-11T08:37:25.809Z","avatar_url":"https://github.com/DFanso.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build \u0026 Deploy\n\nThis repository contains a Node.js project with a Vite web application located in the `sample-web` directory. The project is configured to automatically build and deploy the application to AWS CloudFront when changes are pushed to the `dev` branch.\n\n## Project Structure\n\n```\n├── sample-web\n│   ├── dist\n│   ├── src\n│   ├── package.json\n│   └── ...\n├── .github\n│   ├── workflows\n│   │   └── deploy.yml\n└── README.md\n```\n\n## Prerequisites\n\n- Node.js (version 20.x or higher)\n- AWS CLI configured with appropriate permissions\n- AWS S3 bucket for storing the built application\n- AWS CloudFront distribution for serving the application\n\n## GitHub Actions Workflow\n\nThe workflow file `.github/workflows/deploy.yml` is configured to:\n\n1. Check out the code.\n2. Configure AWS credentials.\n3. Set up Node.js.\n4. Install dependencies.\n5. Build the Vite application.\n6. Deploy the built application to an S3 bucket.\n7. Invalidate the CloudFront cache to ensure the latest version is served.\n\n## Secrets\n\nEnsure the following secrets are set in your GitHub repository settings:\n\n- `AWS_REGION`: The AWS region where your resources are located.\n- `AWS_ACCOUNT_ID`: Your AWS account ID.\n- `AWS_S3_BUCKET_NAME`: The name of the S3 bucket where the built application will be deployed.\n- `AWS_CLOUDFRONT_DISTRIBUTION_ID`: The ID of the CloudFront distribution to invalidate the cache.\n\n## Installation and Deployment\n\n### Local Development\n\n1. Clone the repository:\n\n```sh\ngit clone https://github.com/DFanso/s3-static-web-deploy.git\ncd s3-static-web-deploy/sample-web\n```\n\n2. Install dependencies:\n\n```sh\nnpm install\n```\n\n3. Run the development server:\n\n```sh\nnpm run dev\n```\n\n### Deployment\n\nTo manually trigger the deployment process, push changes to the `dev` branch or use the \"Run workflow\" feature in GitHub Actions.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfanso%2Fs3-static-web-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfanso%2Fs3-static-web-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfanso%2Fs3-static-web-deploy/lists"}