Skip to content

Workflow file for this run

name: Build docs
on:
push:
branches:
- master
- release/*
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
concurrency:
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Build docs
run: make build
- name: Deploy preview to Netlify
uses: nwtgck/actions-netlify@v2
if: github.event_name == 'pull_request'
with:
publish-dir: ./site
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.event.pull_request.title }}
enable-commit-comment: ${{ github.event_name != 'schedule' }}
alias: preview-${{ github.event.number }}
fails-without-credentials: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 5
- name: Build versioned docs
# TODO support publishing non-dev versions
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
PUSH_TOKEN: ${{ secrets.GH_DEPLOY_PUSH_TOKEN }}
run: |
make deploy RELEASE=dev ALIAS=master
git push https://[email protected]/${{ github.repository }} publish
- name: Setup tmate session for debug
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 45
with:
limit-access-to-actor: true