Skip to content

2.1.46

2.1.46 #43

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
run:
runs-on: ubuntu-latest
env:
RACK_ENV: production
ENV_FILE: .env.production
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Build
run: |
cp $ENV_FILE .env
gem install bundler -v 1.17.3
bundle install --jobs 4 --retry 3
yarn install --non-interactive
wget https://github.com/jgm/pandoc/releases/download/1.19.2.1/pandoc-1.19.2.1-1-amd64.deb
sudo dpkg -i pandoc-1.19.2.1-1-amd64.deb
rm pandoc-1.19.2.1-1-amd64.deb
bundle exec middleman build -e $RACK_ENV
- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: build
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /
delete-removed: true
#- name: Notify Slack
# uses: adamkdean/[email protected]
# with:
# channel: '#ops'
# username: 'GitHub Actions'
# color: 'good'
# text: 'A new version of the stats portal has been released.'