Files
vagrant-libvirt/.github/workflows/publish-documentation.yml
Darragh Bailey 82202945ce Migrate documentation to github pages (#1523)
Switch from having all documentation contained within the README to
publishing a jekyll static site of documentation under github pages.

This allows for configuration and installation guides to be handled
separately to make for the relevant pieces to be in smaller chunks and
therefore easier to follow for users. Additionally a table of contents
can now be included in a left navigation section that ensures it should
be possible to quickly jump from the start to any section and back
again.

Include support for publishing previews and releases under separate
directories to allow for them to exist at the same time as the other
latest version of the documents.

The navigation section also includes support for accessing any of the
other versions published so that it easier to see what configuration
options exist for a given release. These will be published automatically
when releases are added.
2022-07-19 13:48:02 +00:00

44 lines
1.2 KiB
YAML

name: Deploy Docs
on:
push:
branches:
- main
paths:
- 'docs/**'
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install and Build 🔧
run: |
# TODO find a way for jekyll to perform this automatically
convert docs/_assets/images/logo.png -define icon:auto-resize=256,64,48,32,16 docs/favicon.ico
# avoid look up of API as it doesn't work from within actions without exposing the GITHUB_TOKEN here which is a security risk
cat <<EOF >> docs/_config.yml
repository_nwo: vagrant-libvirt/vagrant-libvirt
EOF
BUNDLE_GEMFILE=./docs/Gemfile bundle install
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build --source docs/ --destination build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages
folder: build
clean: true
clean-exclude: |
pr-preview/
version/