2021-07-24 01:28:41 +02:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main, 'feature.*']
|
|
|
|
pull_request:
|
|
|
|
|
2022-05-26 00:38:39 +02:00
|
|
|
env:
|
|
|
|
RUBY_VERSION: 2.5.3
|
|
|
|
NODE_VERSION: 16
|
|
|
|
|
2021-07-24 01:28:41 +02:00
|
|
|
jobs:
|
|
|
|
unit_tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-09-30 04:01:03 +02:00
|
|
|
- uses: actions/setup-node@v2
|
2022-05-26 00:38:39 +02:00
|
|
|
with:
|
|
|
|
node-version: ${{ env.NODE_VERSION }}
|
2021-07-24 01:28:41 +02:00
|
|
|
- uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
2022-05-26 00:38:39 +02:00
|
|
|
ruby-version: ${{ env.RUBY_VERSION }}
|
|
|
|
bundler-cache: true
|
2021-07-24 01:28:41 +02:00
|
|
|
- run: bundle exec rake test
|
2022-05-26 00:38:39 +02:00
|
|
|
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [unit_tests]
|
|
|
|
if:
|
|
|
|
github.event_name == 'push' &&
|
|
|
|
github.ref == 'refs/heads/main' &&
|
|
|
|
github.repository == 'sass/sass-site'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: akhileshns/heroku-deploy@79ef2ae4ff9b897010907016b268fd0f88561820 # v3.12.12
|
|
|
|
with:
|
|
|
|
heroku_api_key: ${{ secrets.HEROKU_TOKEN }}
|
|
|
|
heroku_app_name: sass-lang
|
|
|
|
heroku_email: sass.bot.beep.boop@gmail.com
|