Skip to content

Commit

Permalink
GitHub Actions rewritten + necessary code fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Jan 1, 2020
1 parent 59ed980 commit 20a458b
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 216 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/periodic-broken-links-check.yml
@@ -0,0 +1,15 @@
name: periodic-broken-links-check

on:
schedule:
- cron: '8 8 * * 1'

jobs:
broken-link-checker:
runs-on: ubuntu-18.04
steps:
- name: Broken link checker
run: |
export INPUT_URL="https://${GITHUB_REPOSITORY%/*}.github.io/${GITHUB_REPOSITORY##*/}"
export INPUT_CMD_PARAMS="--buffer-size=8192 --concurrency=10 --exclude=mylabs.dev"
wget -qO- https://raw.githubusercontent.com/ruzickap/action-broken-link-checker/v1/entrypoint.sh | bash
87 changes: 87 additions & 0 deletions .github/workflows/vuepress-build-check-deploy.yml
@@ -0,0 +1,87 @@
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:
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" -exec mdspell --ignore-numbers --ignore-acronyms --report --en-gb {} \;

vuepress-build-check-deploy:
runs-on: ubuntu-18.04
needs:
- 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
run: |
ln -s docs/.vuepress/dist ${{ github.event.repository.name }}
wget -qO- https://raw.githubusercontent.com/ruzickap/action-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
100 changes: 0 additions & 100 deletions .github/workflows/vuepress-build.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/yamllint.yml
@@ -0,0 +1,23 @@
name: yamllint

on:
pull_request:
types: [opened, synchronize]
paths:
- '**.yml'
- '**.yaml'
push:
paths:
- '**.yml'
- '**.yaml'

jobs:
yamllint-check:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: yamllint
uses: ibiqlik/action-yamllint@master
with:
file_or_dir: .
3 changes: 3 additions & 0 deletions .markdownlint.yml
@@ -0,0 +1,3 @@
MD013:
code_blocks: false
tables: false
7 changes: 7 additions & 0 deletions .yamllint.yml
@@ -0,0 +1,7 @@
extends: default

rules:
# 80 chars should be enough, but don't fail if a line is longer
line-length:
max: 80
level: warning
Expand Up @@ -23,13 +23,13 @@ spec:
dns01:
# Here we define a list of DNS-01 providers that can solve DNS challenges
providers:
- name: aws-route53
route53:
accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID}
region: eu-central-1
secretAccessKeySecretRef:
name: aws-route53-secret-access-key-secret
key: secret-access-key
- name: aws-route53
route53:
accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID}
region: eu-central-1
secretAccessKeySecretRef:
name: aws-route53-secret-access-key-secret
key: secret-access-key
---
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
Expand All @@ -49,13 +49,13 @@ spec:
# Here we define a list of DNS-01 providers that can solve DNS challenges
# https://docs.cert-manager.io/en/latest/tasks/acme/configuring-dns01/index.html
providers:
- name: aws-route53
route53:
accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID}
region: eu-central-1
secretAccessKeySecretRef:
name: aws-route53-secret-access-key-secret
key: secret-access-key
- name: aws-route53
route53:
accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID}
region: eu-central-1
secretAccessKeySecretRef:
name: aws-route53-secret-access-key-secret
key: secret-access-key
---
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
Expand All @@ -69,12 +69,12 @@ spec:
name: letsencrypt-${LETSENCRYPT_ENVIRONMENT}-dns
commonName: "*.${MY_DOMAIN}"
dnsNames:
- "*.${MY_DOMAIN}"
- ${MY_DOMAIN}
- "*.${MY_DOMAIN}"
- ${MY_DOMAIN}
acme:
config:
- dns01:
provider: aws-route53
domains:
- "*.${MY_DOMAIN}"
- ${MY_DOMAIN}
- dns01:
provider: aws-route53
domains:
- "*.${MY_DOMAIN}"
- ${MY_DOMAIN}

0 comments on commit 20a458b

Please sign in to comment.