mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* 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>
52 lines
1.2 KiB
YAML
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 }}
|