This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
110 lines (93 loc) · 3.41 KB
/
vuepress-build-check-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: vuepress-build-check-deploy
on:
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows/vuepress-build-check-deploy.yml
- docs/**
- .markdownlint.yml
- .spelling
- package.json
- package-lock.json
push:
branches:
- master
paths:
- .github/workflows/vuepress-build-check-deploy.yml
- docs/**
- .markdownlint.yml
- .spelling
- package.json
- package-lock.json
jobs:
markdownlint-check:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: markdownlint-cli
uses: nosborn/github-action-markdown-cli@v1.1.1
with:
files: .
config_file: .markdownlint.yml
markdown-spell-check:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- 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: find . -type f -name "*.md" | xargs --max-args=1 --verbose mdspell --ignore-numbers --ignore-acronyms --report --en-gb
command-check:
name: Command check
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Update repositories
run: sudo apt-get update
- name: Install necessary tools
run: |
sudo apt-get install -y -qq gnupg2 jq pv > /dev/null
curl -s -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
curl -s -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/v0.6.0/kind-linux-amd64 && chmod +x kind && sudo mv kind /usr/local/bin/
- name: Run tests
run: |
tests/tests.sh
vuepress-build-check-deploy:
runs-on: ubuntu-18.04
needs:
- command-check
- markdownlint-check
- markdown-spell-check
steps:
- uses: actions/checkout@v2
- name: Install Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install VuePress and build the document
run: |
npm install
npm run build
cp LICENSE docs/.vuepress/dist
sed -e "s@(part-@(https://github.com/${GITHUB_REPOSITORY}/tree/master/docs/part-@" -e 's@.\/.vuepress\/public\/@./@' docs/README.md > docs/.vuepress/dist/README.md
- name: Check broken links
env:
INPUT_URL: https://${{ github.event.repository.owner.name }}.github.io/${{ github.event.repository.name }}
INPUT_PAGES_PATH: .
INPUT_CMD_PARAMS: --buffer-size=8192 --concurrency=10 --skip-tls-verification --exclude=(mylabs.dev|ruzickap.github.io/k8s-harbor-presentation)
run: |
ln -s docs/.vuepress/dist ${{ github.event.repository.name }}
wget -qO- https://github.com/raw/ruzickap/action-my-broken-link-checker/v1/entrypoint.sh | bash
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.8.0
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./docs/.vuepress/dist
with:
forceOrphan: true