new-horizons/.github/workflows/docs_build.yml
Ben C 2552d1b8a4
Added XML Schemas To Docs (#57)
* Add Bootstrap Extension

* Rename main.yml

* Artifact Upload

* Fix Bootstrap Reference Error

* BootstrapTreeProcessor

* getiterator removed

* keys function

* Style Images

* Update docs_build.yml

* Added Meta Files

* Template Get

* Fix Page Ref

* Update BASE_URL

* Sort Schemas

* Add Sitemaps

* Add favicons, open-graph, and setup guide

* Update Setup.md

* Update .gitignore

* Update Setup.md

* Use _blank on external links

* Restructured Docs

* Fix Links

* Added XML Schemas

* Name XML Schemas
2022-03-04 23:27:26 -08:00

71 lines
1.7 KiB
YAML

name: Build Docs
on:
push:
branches: [ master ]
paths:
- docs/**
- NewHorizons/*schema*.json
workflow_dispatch:
inputs:
relative_path:
description: "Path to set for relative files, set to a blank string for local builds"
required: false
default: "/"
env:
OUT_DIR: ${{ github.events.inputs.relative_path }}
BASE_URL: https://nh.outerwildsmods.com/
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cp -r docs/** .
- if: github.ref == 'refs/heads/master'
run: |
echo "OUT_DIR=/" >> $GITHUB_ENV
- name: Install dependecies
uses: VaultVulp/action-pipenv@v2.0.1
with:
command: install
- name: Copy Schemas
run: |
mkdir content/schemas/
cp NewHorizons/schema.json content/schemas/
cp NewHorizons/star_system_schema.json content/schemas/
cp NewHorizons/translation_schema.json content/schemas/
cp NewHorizons/shiplog_schema.xsd content/schemas/
cp NewHorizons/dialogue_schema.xsd content/schemas/
- name: Create Output Dir
run: |
mkdir out/
mkdir out/schemas/
- name: Build Site
uses: VaultVulp/action-pipenv@v2.0.1
with:
command: run python generate.py
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Built-Docs
path: out/
- name: Deploy To Pages
if: success() && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: out/