Skip to content

GitHub Actions#12353

Merged
crazy-max merged 4 commits intomasterfrom
github-actions
Nov 25, 2020
Merged

GitHub Actions#12353
crazy-max merged 4 commits intomasterfrom
github-actions

Conversation

@crazy-max
Copy link
Copy Markdown
Member

This PR is the beginning of a best-effort to migrate to GitHub Actions as discussed on Discord since travis-ci.org will be officially closed down completely on December 31st, 2020. But today travis-ci.com requires a limited number of credits.

...we will upgrade you to our trial (free) plan with a 10K credit allotment (which allows around 1000 minutes in a Linux environment).

ATM I've added a simple workflow to generate mkdocs documentation without disruption of the actual implementation with the Travis build:

  • Doc generated with a simple Dockerfile. In the future we could remove scripts/deploy-docs.sh.
  • Push generated documentation to gh-pages branch on this repo.
  • We could remove librenms-docs/librenms-docs.github.io and only rely on this repo for a better integration and without sharing a Personal Access Token.

You can generate and test doc locally with the following commands:

  • Create mkdocs Docker image: docker build -t mkdocs -f ./doc/Dockerfile .
  • Launch local doc website (http://localhost:8000): docker run --rm -it -p 8000:8000 -v $(pwd):/docs mkdocs

Live example of the build process and generated doc available on my fork: https://github.com/crazy-max/librenms/runs/1452595127?check_suite_focus=true

image

https://crazymax.dev/librenms/

@crazy-max
Copy link
Copy Markdown
Member Author

crazy-max commented Nov 25, 2020

I've disabled strict mode for mkdocs compilation otherwise the generation fails: https://github.com/librenms/librenms/runs/1454332054?check_suite_focus=true#step:5:38. We should fix this error upstream.

@crazy-max
Copy link
Copy Markdown
Member Author

crazy-max commented Nov 25, 2020

The following pages exist in the docs directory, but are not included in the "nav" configuration. Could be fixed later.

  - API/API-Docs.md
  - Alerting/Old_Templates.md
  - Extensions/Alerting.md
  - Extensions/Email-Alerting.md
  - Extensions/Graphite.md
  - Extensions/InfluxDB.md
  - Extensions/OpenTSDB.md
  - Extensions/Poller-Service.md
  - Extensions/Port-Description-Parser.md
  - Extensions/Prometheus.md
  - Extensions/RRDCached-Security.md
  - General/Contributing.md
  - General/Credits.md
  - Installation/CentOS-image.md
  - Installation/Installation-CentOS-6-Apache-Nginx.md
  - Installation/Installation-CentOS-7-Apache.md
  - Installation/Installation-CentOS-7-Nginx.md
  - Installation/Installation-Debian-10-Nginx.md
  - Installation/Installation-Ubuntu-1604-Apache.md
  - Installation/Installation-Ubuntu-1604-Nginx.md
  - Installation/Installation-Ubuntu-1804-Apache.md
  - Installation/Installation-Ubuntu-1804-Nginx.md
  - Installation/Installing-LibreNMS.md
  - Installation/Ubuntu-image.md
  - Support/Support-New-OS.md

@murrant
Copy link
Copy Markdown
Member

murrant commented Nov 25, 2020

The pages excluded from NAV are intentional and are linked to in other ways or legacy docs.
Fix the bad doc link.

Overall workflow is:
Build docs for every PR and fail if docs build fails.
Deploy only from the master branch

I think the reason the docs is/was separate is we can only have one GH pages per org.

@crazy-max
Copy link
Copy Markdown
Member Author

crazy-max commented Nov 25, 2020

@murrant

The pages excluded from NAV are intentional and are linked to in other ways or legacy docs.
Fix the bad doc link.

👍

Build docs for every PR and fail if docs build fails.
Deploy only from the master branch

Build for every PR, master branch and tags. I've included tags if in the future we want a "versionized" documentation like traefik:

image

I can remove this event in the meantime if you want.

I think the reason the docs is/was separate is we can only have one GH pages per org.

Not anymore. You can now have as many as you want per org. You just have to include a custom CNAME like you did for custom domains.

@crazy-max
Copy link
Copy Markdown
Member Author

@murrant I have enabled strict mode and it looks ok now.

@murrant
Copy link
Copy Markdown
Member

murrant commented Nov 25, 2020

@crazy-max we don't have the man power for a versioned docs :D

@crazy-max crazy-max merged commit d8c617d into master Nov 25, 2020
@crazy-max crazy-max deleted the github-actions branch November 25, 2020 22:18
@murrant
Copy link
Copy Markdown
Member

murrant commented Dec 2, 2020

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-69-release-changelog-november-2020/14124/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants