sass-site/.github/workflows/ci.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2021-07-24 01:28:41 +02:00
name: CI
on:
push:
branches: [main, 'feature.*']
pull_request:
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:
2023-01-09 20:10:02 +01:00
- 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
2023-01-09 22:31:48 +01:00
- run: bundle exec rake test
release:
runs-on: ubuntu-latest
needs: [unit_tests]
2023-01-09 20:10:02 +01:00
if: github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
github.repository == 'sass/sass-site'
steps:
2023-01-09 20:10:02 +01:00
- 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
2023-01-09 20:10:02 +01:00
- 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