I am a sucker for CI/CD pipelines. I pretty much build those out before I build any other project, to be honest. Ever since Github came out with workflow and actions I have been all over it!
我是CI / CD管道的傻瓜。 老实说,我几乎在构建任何其他项目之前就已经将它们进行了构建。 自从Github提出了工作流程和操作以来,我就已经完成了!
Instead of relying on some online rando’s actions, I went straight to the source. AWS created and support their own Github actions. AND on top of that, Github actually comes pre-installed with AWS CLI now.
我不依赖于某些网上rando的行为,而是直接参考了消息来源。 AWS创建并支持自己的Github操作 。 最重要的是, Github实际上现在已经预装了AWS CLI 。
I just wanted to simply update an S3 bucket and invalidate my Cloudfront for the bucket.
我只想简单地更新一个S3存储桶,并使该存储桶的Cloudfront无效。
First, we configure our credentials using the Github Action provided by AWS engineers, — doing God’s work.
首先,我们使用AWS工程师提供的Github Action配置我们的凭证,即完成上帝的工作 。
AWS Github action supported by AWS AWS支持的AWS Github操作Secondly, we then run AWS CLI like we normally would.
其次,然后像往常一样运行AWS CLI。
Run AWS cli like any normal command 像任何普通命令一样运行AWS cliIf you want to learn how to set up an S3 Bucket to Cloudfront for hosting then read my tutorial here.
如果您想学习如何将S3存储桶设置到Cloudfront进行托管,请在此处阅读我的教程。
翻译自: https://medium.com/@kylecalicast/official-aws-for-github-actions-21b4cb39b8d3
相关资源:aws-github-actions:使用GitHub Actions将部署到AWS:cloud:!-源码