mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
52 lines
1.2 KiB
YAML
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
|