Use the correct date... #38
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
name: Build and Deploy | |
environment: production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Build site | |
run: JEKYLL_ENV=production bundle exec rake build | |
- name: Deploy to S3 | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --follow-symlinks --content-encoding 'gzip' | |
env: | |
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET_NAME }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'us-east-1' | |
SOURCE_DIR: '_site' | |
- name: Purge Cloudflare cache | |
run: bundle exec rake purge_cloudflare_html_files | |
env: | |
CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }} | |
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }} | |
CF_API_KEY: ${{ secrets.CF_API_KEY }} | |