Skip to content

Commit

Permalink
GitHub Action file improved
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Nov 30, 2019
1 parent fcf4d18 commit c5efe35
Showing 1 changed file with 47 additions and 3 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/hugo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,62 @@ on:
branches: [master]

jobs:
markdown-lint-check:
name: "Markdown lint check"
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1

- name: "Install Node.js 12"
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: "Install markdownlint-cli"
run: npm install -g markdownlint-cli

- name: "Create markdownlint configuration file"
run: |
echo "{ MD013: { code_blocks: false } }" > /tmp/markdownlint_config.json
- name: "Run markdownlint"
run: find . -path ./themes -prune -o -path ./node_modules -prune -o -name "*.md" -print0 | xargs -t -0 markdownlint -c /tmp/markdownlint_config.json

markdown-spell-check:
name: "Markdown spell check"
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1

- name: "Install Node.js 12"
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: "Install markdown-spellcheck"
run: npm install -g markdown-spellcheck

- name: "Run mdspell"
run: mdspell '**/*.md' '!**/node_modules/**/*.md' '!**/themes/**/*.md' --ignore-numbers --ignore-acronyms --report --en-gb

hugo-build:
name: "Hugo build"
runs-on: ubuntu-18.04
needs:
- markdown-lint-check
- markdown-spell-check

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.2.3
uses: peaceiris/actions-hugo@v2.3.0
with:
hugo-version: '0.59.0'
hugo-version: '0.60.1'

- name: Build
run: |
Expand All @@ -38,7 +82,7 @@ jobs:
~/go/bin/muffet --concurrency=10 --skip-tls-verification --buffer-size=8192 --exclude "https://www.linkedin.com/in/petrruzicka/" https://${GITHUB_REPOSITORY##*/}
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.0
uses: peaceiris/actions-gh-pages@v2.5.1
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
Expand Down

0 comments on commit c5efe35

Please sign in to comment.