Files
librenms-librenms/.github/workflows/doc.yml
CrazyMax 4126dddf73 GitHub Actions dev:check ci (#12392)
* Refactor test for GitHub Actions

* Checkout pull request HEAD commit instead of merge commit

* Fetch changed files from API instead of git

* HEAD commit

* Origin

* Fix env

* force full unit checks on gh actions change

* Fix DB conn

* Update test.yml

* Also set port in PDO connection

* Exit with correct exit code

* Update CiHelper.php

* Update test.yml

* Update CiHelper.php

* Update Proc.php

* Cleanups

Remove extra unit test run on php 7.4
Add names that will hopefully show in github.
Remove redundant DB env variables.

* Fix

Shorter names
and DB_TEST env is required

* Change command for information purposes

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-01-03 00:54:01 -06:00

52 lines
1.2 KiB
YAML

name: doc
on:
push:
branches:
- 'master'
paths:
- '.github/workflows/doc.yml'
- 'doc/**'
- 'mkdocs.yml'
pull_request:
branches:
- 'master'
paths:
- '.github/workflows/doc.yml'
- 'doc/**'
- 'mkdocs.yml'
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Build mkdocs Docker image
run: |
docker build -t mkdocs -f ./doc/Dockerfile ./
-
name: Build docs
run: |
docker run --rm -v "$(pwd):/docs" mkdocs build --strict
sudo chown -R $(id -u):$(id -g) ./out
-
name: Check GitHub Pages status
uses: crazy-max/ghaction-github-status@v2
with:
pages_threshold: major_outage
-
name: Deploy
if: github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch)
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
keep_history: true
build_dir: out
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}