feat: generate documentation in CI and auto-push to the docs site

This commit is contained in:
Jose Diaz-Gonzalez
2022-09-10 14:53:21 -04:00
parent bed0e0ce71
commit 3aab81aa7c
2 changed files with 52 additions and 1 deletions

34
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
---
name: 'docs'
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate documentation
env:
BOT_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
BOT_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
run: |
git config --global user.name 'Dokku Bot'
git config --global user.email no-reply@dokku.com
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh -y
gh auth login --with-token <<<"$BOT_GITHUB_API_TOKEN"
contrib/build-docs