name: Publish docs to Start9 Pages
on:
workflow_run:
workflows: ['Build and deploy docs']
types: [completed]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: 'deploy-docs-pages'
cancel-in-progress: false
jobs:
build-and-publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: projects/start-docs
steps:
- uses: actions/checkout@v6
with:
ref: live-docs
- name: Stand down if live-docs publishes on its own
id: live
run: |
if grep -q nextexplorer-publish ../../.github/workflows/docs-deploy.yml; then
echo "publishes=true" >> "$GITHUB_OUTPUT"
fi
- name: Setup Node.js
if: steps.live.outputs.publishes != 'true'
uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install mdBook
if: steps.live.outputs.publishes != 'true'
run: |
MDBOOK_VERSION='v0.5.2'
curl -sSL https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
sudo mv mdbook /usr/local/bin/mdbook
- name: Install mdbook-tabs
if: steps.live.outputs.publishes != 'true'
run: |
cargo install mdbook-tabs --version 0.3.4
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build the site
if: steps.live.outputs.publishes != 'true'
run: ./build.sh
- name: Publish to NextExplorer
if: steps.live.outputs.publishes != 'true'
uses: Start9Labs/start-technologies/.github/actions/nextexplorer-publish@master
with:
url: https://${{ vars.NEXT_EXPLORER_EVELYN_URL }}
email: ${{ vars.NEXT_EXPLORER_EVELYN_USER }}
password: ${{ secrets.NEXT_EXPLORER_EVELYN_PASS }}
dir: projects/start-docs/docs
folder: docs.start9.com
keep: 0.3.5.x