mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Improve GitHub Actions PR workflow (#11845)
This commit is contained in:
parent
a52c915a31
commit
3909239671
20
.github/workflows/markdown.yml
vendored
20
.github/workflows/markdown.yml
vendored
@ -1,20 +0,0 @@
|
||||
name: Markdown
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
remark:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checking out files from GitHub
|
||||
uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Installing dependencies
|
||||
run: npm install
|
||||
env:
|
||||
CI: true
|
||||
- name: Running remark lint
|
||||
run: npm run markdown:lint
|
62
.github/workflows/test.yml
vendored
Normal file
62
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: home-assistant.io Test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
markdown-lint:
|
||||
name: Lint Markdown
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name: Setting up Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Setup NPM cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: npm-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
npm-
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
env:
|
||||
CI: true
|
||||
- name: Run remark lint
|
||||
run: npm run markdown:lint
|
||||
build:
|
||||
name: Jekyll build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [markdown-lint]
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name: Setting up Ruby 2.6
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
- name: Setup Ruby Gems cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
gems-
|
||||
- name: Installing dependencies
|
||||
run: |
|
||||
gem install bundler -v 2.0.1
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
- name: Setting up Jekyll cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: source/.jekyll-cache
|
||||
key: jekyll-${{ hashFiles('**/Gemfile.lock') }}-${{ hashFiles('**/_config.yml') }}
|
||||
restore-keys: |
|
||||
jekyll-${{ hashFiles('**/Gemfile.lock') }}-
|
||||
jekyll-
|
||||
- name: Building site
|
||||
run: |
|
||||
bundle exec rake generate
|
Loading…
x
Reference in New Issue
Block a user