将静态站点部署到github push上的s3的最佳策略? [英] Best strategy to deploy static site to s3 on github push?

查看:79
本文介绍了将静态站点部署到github push上的s3的最佳策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想自动将我们的网站部署到AWS S3.我已经编写了一个节点脚本来自动构建和上传站点,但是我想让我们的仓库中master分支在github上更新时自动运行该脚本.

I'd like to automate deploying our site to AWS S3. I've written a node script to automate building and uploading the site, but I'd like to have the script automatically run whenever the master branch of our repo is updated on github.

我研究了AWS CodeDeploy,但这看起来是专门用于部署到EC2的.我也看过AWS Lambda,但似乎没有一种明确的方法来使用git提取存储库的副本,以便我可以运行脚本.

I looked into AWS CodeDeploy, but it looks like that's for specifically deploying to EC2. I've also looked at AWS Lambda, but there doesn't seem to be a clear way to pull a copy of the repo using git so I can run the script.

我可以使用任何服务(最好与AWS绑定)吗?

Any services (preferably tied to AWS) that I can use?

推荐答案

与其直接使用AWS服务(您几乎都说他们期望更复杂的设置,部署到EC2等),不如使用CI提供者,例如可发货 Wercker .

Rather than using an AWS service directly (as you say they nearly all expect a much more complicated setup, deploying to EC2 etc), you might be better off using a CI provider such as Shippable, Codeship or Wercker.

所有这些功能都可以从git更新中触发,运行构建命令,将实用程序安装到其CI映像/容器中以及将文件复制到S3.

These all have the ability to fire from git updates, run build commands, install utilities into their CI images/containers and copy files to S3.

可能有一些初创公司已经针对您的目的构建了精确的工具,但是它们尚未出现在我的雷达中:-)

There's probably some startup which has built an exact tool for your purpose, but they haven't appeared on my radar yet :-)

这篇关于将静态站点部署到github push上的s3的最佳策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆