-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.04 KB
/
deploy-s3-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
name: Deploy _site to S3 (prod)
on:
# XXX this workflow runs only when you have merged PR to `master`
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
# set AWS access and secret access key in the repository: "secrets"
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# set the AWS region as indicated in the bucket
aws-region: us-west-1
- name: Setup ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install bundler
run: gem install bundler
- name: Install gems
run: bundle install
- name: Build static site
run: bundle exec jekyll build
- name: Deploy static site to production S3 bucket
run: |
aws s3 sync ./_site/ s3://mywebprod --delete