Skip to content

API: Separate core and plugin docs (#1345) #1786

API: Separate core and plugin docs (#1345)

API: Separate core and plugin docs (#1345) #1786

Workflow file for this run

name: Build
on:
# Run the build for pushes and pull requests targeting master
push:
branches:
- master
pull_request:
branches:
- master
# Used to trigger the build from external docs repos. Can by kicked off via:
# curl -X POST -H "Authorization: token $GH_PAT" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/btcpayserver/btcpayserver-doc/dispatches --data '{"event_type": "build_docs"}'
repository_dispatch:
types:
- build_docs
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout doc repo and its dependencies
- uses: actions/checkout@v3
# Setup Node
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
# Install, test and build
- name: Install
run: npm ci
# Link the dependencies
- name: Setup dependencies
run: ./setup-deps.sh
# Test and build
- name: Test
run: npm test
- name: Build
run: npm run build
# Deploy, limited to the master branch
- name: Redirects
if: success()
run: npm run redirects
- name: Deploy
if: success() && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./docs/.vuepress/dist
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: docs.btcpayserver.org
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'