sass-site/.github/workflows/ci.yml
Jonny Gerig Meyer 29d77ce08a
Add prettier
2023-01-09 14:10:02 -05:00

52 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [main, 'feature.*']
pull_request:
env:
RUBY_VERSION: 2.5.3
NODE_VERSION: 16
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- run: bundle exec rake test
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: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- run: bundle exec rake build
- name: Deploy
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 # v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: sass-lang.com
allow_empty_commit: true