Skip to content

Commit a7159c9

Browse files
afhtbm
authored andcommitted
Add S3 deployment via GitHub Action
1 parent fb04de8 commit a7159c9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,19 @@ jobs:
2828
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2929
- name: Build website
3030
run: bundle exec middleman build
31-
- name: Make docs
31+
- name: Build documentation
3232
run: make docs
33+
- name: Deploy
34+
if: ${{ github.ref == 'refs/heads/master' }}
35+
env:
36+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
37+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
38+
uses: reggionick/s3-deploy@v3
39+
with:
40+
folder: build
41+
bucket: ${{ vars.AWS_S3_BUCKET }}
42+
bucket-region: ${{ vars.AWS_S3_BUCKET_REGION }}
43+
delete-removed: true
44+
no-cache: true
45+
private: true
46+
files-to-include: ".*/*,*/*,**"

0 commit comments

Comments
 (0)