Skip to content

Commit

Permalink
ci: fix test of website
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Dec 11, 2020
1 parent dec6232 commit 714cad8
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 26 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
---
name: Website
## These checks will be superseded by documentation.yml
## when the provider documentation layout is moved to
## the Terraform Registry layout.
name: Website Checks
on:
push:
branches:
- master
- "release/**"
- 'release/**'
pull_request:
types: ['opened', 'synchronize']
paths:
- '**.go'
- 'vendor/**'
- '.github/workflows/**'

env:
GO_VERSION: "1.15"
GOPROXY: https://gocenter.io,https://proxy.golang.org,direct
- .github/workflows/website.yaml
- website/docs/**
- .markdownlint.yml

jobs:
test:
markdown-link-check:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: gaurav-nelson/github-action-markdown-link-check@v1
name: markdown-link-check website/docs/**/*.markdown
with:
go-version: '1.15'
- run: bash scripts/gogetcookie.sh
- run: |
cat /etc/issue
echo "whoami" && whoami
sudo mkdir -p /go && sudo chown -R $(whoami) /go
export GOPATH="/go"
echo "GOPATH: $GOPATH"
make website-test
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.markdownlinkcheck.json'
folder-path: 'website/docs'
file-extension: '.markdown'
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: avto-dev/markdown-lint@v1
with:
args: 'website/docs'
config: '.markdownlint.yml'
14 changes: 14 additions & 0 deletions .markdownlinkcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"ignorePatterns": [
],
"replacementPatterns": [
{
"pattern": "^/docs/providers/docker/r/(.*).html",
"replacement": "/github/workspace/website/docs/r/$1.html.markdown"
},
{
"pattern": "^/docs/providers/docker/d/(.*).html",
"replacement": "/github/workspace/website/docs/d/$1.html.markdown"
}
]
}
22 changes: 22 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Configuration for markdownlint
# https://github.com/DavidAnson/markdownlint#configuration

default: true

# Disabled Rules
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md

MD001: false
MD004: false
MD007: false
MD009: false
MD010: false
MD012: false
MD013: false
MD014: false
MD022: false
MD031: false
MD032: false
MD033: false
MD034: false
MD047: false

0 comments on commit 714cad8

Please sign in to comment.