Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy | |
on: | |
push: | |
branches: | |
- master | |
- remove-mini_racer-from-dependencies | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7' # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: make site | |
run: bundle exec jekyll build | |
- name: deploy to S3 | |
uses: jakejarvis/s3-sync-action@master | |
if: contains(github.ref, 'master') | |
with: | |
args: --acl public-read --follow-symlinks --delete --cache-control max-age=600 | |
env: | |
AWS_S3_BUCKET: 'www.nateberkopec.com' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'us-east-1' | |
SOURCE_DIR: '_site' | |
- name: Cloudflare Purge Cache | |
uses: jakejarvis/cloudflare-purge-action@v0.3.0 | |
if: contains(github.ref, 'master') | |
env: | |
# Zone is required by both authentication methods | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} |