{"id":19293165,"url":"https://github.com/jweyrich/static-deployer","last_synced_at":"2025-06-21T07:03:44.781Z","repository":{"id":42449628,"uuid":"409006260","full_name":"jweyrich/static-deployer","owner":"jweyrich","description":"☁ Deploy static websites using a single command! Currently supports AWS S3 and CloudFront.","archived":false,"fork":false,"pushed_at":"2024-02-15T15:36:18.000Z","size":37,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-17T00:28:40.085Z","etag":null,"topics":["aws-cloudfront","aws-s3","cloudfront","cloudfront-distribution","cloudfront-invalidation","deploy","deploy-tool","deployer","deployment","deployment-automation","s3","s3-bucket","single-page-app","single-page-applications","single-page-site","site","website"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/static-deployer/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jweyrich.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":"2021-09-21T23:45:42.000Z","updated_at":"2022-08-12T12:54:31.000Z","dependencies_parsed_at":"2024-11-09T22:34:24.529Z","dependency_job_id":"45b857fe-ca2a-4304-84cf-2d0e972811f0","html_url":"https://github.com/jweyrich/static-deployer","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"8e3950b22fac176ac71d75fd9ca9e8a767ba03ad"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jweyrich/static-deployer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jweyrich%2Fstatic-deployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jweyrich%2Fstatic-deployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jweyrich%2Fstatic-deployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jweyrich%2Fstatic-deployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jweyrich","download_url":"https://codeload.github.com/jweyrich/static-deployer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jweyrich%2Fstatic-deployer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261080476,"owners_count":23106595,"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","aws-s3","cloudfront","cloudfront-distribution","cloudfront-invalidation","deploy","deploy-tool","deployer","deployment","deployment-automation","s3","s3-bucket","single-page-app","single-page-applications","single-page-site","site","website"],"created_at":"2024-11-09T22:34:12.868Z","updated_at":"2025-06-21T07:03:39.772Z","avatar_url":"https://github.com/jweyrich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# static-deployer\n\n## What is static-deployer?\n\nstatic-deployer aims to simplify the deploy and rollback of your static website (frontend) to AWS using a single command.\nIt _still_ does not create the AWS resources for you, so you need to have a previously existing S3 bucket and a CloudFront distribution configured with an origin pointing to your S3 bucket.\nThe credentials you will use to run the static-deployer need to have List+Read+Write permissions to the specified bucket and cloudfront distribution.\n\n## How to install?\n\n    pip3 install static-deployer\n\n## How to configure the AWS credentials?\n\nWe recomend using [aws-vault](https://github.com/99designs/aws-vault) because it does not store your credentials in plaintext. But you can also use [aws-cli](https://aws.amazon.com/cli/).\n\nAfter installing aws-vault, add a new profile using the following command:\n\n```sh\naws-vault add mysite\n```\n\n## How to deploy a static website?\n\n    aws-vault exec mysite -- static-deployer deploy \\\n        --root-dir ROOT_DIR \\\n        --patterns PATTERNS \\\n        --bucket-name BUCKET_NAME \\\n        --distribution-id DISTRIBUTION_ID \\\n        --origin-name ORIGIN_NAME \\\n        --version VERSION\n        --cache-maxage \"1 hour\"\n\nThe deploy command does the following:\n\n1. Finds all files from `ROOT_DIR`, including only those that match the patterns specified in `PATTERNS` (comma separated);\n2. Inside the bucket specified by `BUCKET_NAME`, creates a new folder/directory with the name specified in `VERSION`;\n3. Uploads all files to the folder/directory created in step 2;\n4. Changes the CloudFront distribution `DISTRIBUTION_ID` origin named `ORIGIN_NAME` to point the folder/directory created in step 2;\n4. Invalidates the CloudFront distribution `DISTRIBUTION_ID` cache using the pattern `/*`;\n5. Waits for the distribution changes to complete.\n\n## How to rollback to a previous deployed version?\n\n    static-deployer rollback \\\n        --bucket-name BUCKET_NAME \\\n        --distribution-id DISTRIBUTION_ID \\\n        --origin-name ORIGIN_NAME \\\n        --version VERSION\n\nThe rollback command does the following:\n1. Changes the CloudFront origin `ORIGIN_NAME` to point to a previously deployed version specified by `VERSION`.\n2. Waits for the distribution changes to complete.\n\n## Example of config file `config.toml`\n\n```toml\ndry_run = \"false\"\n\n[content]\nroot_dir = \"public\"\npatterns = \"**\"\n\n[storage]\nname = \"your-website-domain.com\"\nprefix = \"{{version}}\"\ncache_maxage = \"1 hour\"\n\n[cdn]\ndistribution_id = \"your-cloudfront-distribution-id\"\norigin_name = \"your-cloudfront-origin-name\"\n```\n\n## How to use the config file?\n\n    static-deployer -c config.toml deploy --version VERSION\n\nOnce you have settings in a config file, you can tell static-deployer to use the config file by using the arguments `-c yourfile.toml`.\nBy specifying a config file, you eliminate the need of informing all parameters at every invocation. You're then required to inform only the missing parameters.\nThe command-line arguments override any settings you have in the config file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjweyrich%2Fstatic-deployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjweyrich%2Fstatic-deployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjweyrich%2Fstatic-deployer/lists"}