mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 12:05:23 +01:00
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Build Docs
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
schemas_artifact:
|
|
description: "Name of the artifact that has updated schemas, set to `null` to not update"
|
|
default: "null"
|
|
required: false
|
|
type: string
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- docs/**
|
|
- NewHorizons/Schemas/*
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Download Schemas
|
|
if: ${{ inputs.schemas_artifact != 'null' }}
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: ${{ inputs.schemas_artifact }}
|
|
path: NewHorizons/Schemas
|
|
- name: Build Site
|
|
uses: withastro/action@v1
|
|
with:
|
|
path: ./docs
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v1
|