Skip to content

Deploy Docs

Deploy Docs #563

Workflow file for this run

name: Deploy Docs
on:
push:
branches:
- master
paths:
- "docs/**"
- ".github/workflows/docs.yml"
tags:
- v*
- git-v*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
repository_dispatch:
types: [docs]
gollum:
permissions:
contents: read
jobs:
job-sync-docs-to-wiki:
permissions:
contents: write
runs-on: ubuntu-latest
if: github.event_name != 'gollum'
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Sync docs to wiki
uses: newrelic/wiki-sync-action@v1.0.1
with:
source: docs
destination: wiki
token: ${{ secrets.DOTFILES_GITHUB_TOKEN }}
job-sync-wiki-to-docs:
permissions:
contents: write
runs-on: ubuntu-latest
if: github.event_name == 'gollum'
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Sync Wiki to Docs
uses: newrelic/wiki-sync-action@v1.0.1
with:
source: wiki
destination: docs
token: ${{ secrets.DOTFILES_GITHUB_TOKEN }}
branch: master
deploy:
needs:
- job-sync-docs-to-wiki
- job-sync-wiki-to-docs
# run if any of the previous jobs succeeded
if: ${{ always() }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Wiki Content
uses: actions/checkout@v4
- name: Checkout github-wikito-converter
uses: actions/checkout@v4
with:
repository: yakivmospan/github-wikito-converter
path: github-wikito-converter
- name: Build and Install github-wikito-converter globally
run: |
cd github-wikito-converter
npm install
npm run build
cd ..
- name: Build Docs
run: |
mkdir public
node ./github-wikito-converter/dist/cli/gwtc.js --file-name index --output ./public --toc-level 3 ./docs
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public