mirror of
https://github.com/danog/sass-site.git
synced 2024-11-26 20:14:53 +01:00
03bdff1f13
Now that we're serving primarily from GitHub pages, we should deploy to the full website and not the subdomain.
53 lines
1.2 KiB
YAML
53 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
|