Set up documentation generation ci pipeline
This commit is contained in:
parent
542fce1ded
commit
82f80263b9
50
.github/workflows/gen-docs.yml
vendored
Normal file
50
.github/workflows/gen-docs.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
name: Generate Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Checkout submodules
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||||
|
git submodule sync --recursive
|
||||||
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||||
|
|
||||||
|
# Initial setup
|
||||||
|
- name: Setup mdBook
|
||||||
|
uses: peaceiris/actions-mdbook@v1
|
||||||
|
with:
|
||||||
|
mdbook-version: 'latest'
|
||||||
|
|
||||||
|
# Build all the components
|
||||||
|
- name: Build RustDoc
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: doc
|
||||||
|
- name: Build mdBook
|
||||||
|
run: mdbook build
|
||||||
|
|
||||||
|
# Organize the output
|
||||||
|
- name: Create output directory
|
||||||
|
run: mkdir -p documentation_output
|
||||||
|
- name: Move mdBook output
|
||||||
|
run: mv target/book documentation_output/book
|
||||||
|
- name: Move RustDoc output
|
||||||
|
run: mv target/doc documentation_output/rustdoc
|
||||||
|
- name: Move index page
|
||||||
|
run: mv assets/www/index.html documentation_output/index.html
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./documentation_output
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -12,3 +12,6 @@ Cargo.lock
|
|||||||
|
|
||||||
# MSVC Windows builds of rustc generate these, which store debugging information
|
# MSVC Windows builds of rustc generate these, which store debugging information
|
||||||
*.pdb
|
*.pdb
|
||||||
|
|
||||||
|
# MdBook generated files
|
||||||
|
/book
|
1
assets/www/README.txt
Normal file
1
assets/www/README.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
This directory exists just to host the web index.html file.
|
13
assets/www/index.html
Normal file
13
assets/www/index.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Ludum Dare 50</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>test</h1>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
25
book.toml
Normal file
25
book.toml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[book]
|
||||||
|
authors = ["Evan Pratten"]
|
||||||
|
language = "en"
|
||||||
|
multilingual = false
|
||||||
|
src = "docs"
|
||||||
|
title = "Ludum Dare 50"
|
||||||
|
|
||||||
|
[output.html]
|
||||||
|
mathjax-support = true
|
||||||
|
theme = "light"
|
||||||
|
default-theme = "light"
|
||||||
|
git-repository-url = "https://github.com/Ewpratten/ludum-dare-50"
|
||||||
|
site-url = "/docs"
|
||||||
|
|
||||||
|
[output.html.search]
|
||||||
|
enable = true
|
||||||
|
|
||||||
|
[output.html.print]
|
||||||
|
enable = true
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
build-dir = "target/book"
|
6
docs/SUMMARY.md
Normal file
6
docs/SUMMARY.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Summary
|
||||||
|
|
||||||
|
1. [Introduction](introduction.md)
|
||||||
|
2. [Getting Started](getting-started.md)
|
||||||
|
1. [Development Environment](development-environment.md)
|
||||||
|
2. [Artist Information](artist-information.md)
|
1
docs/artist-information.md
Normal file
1
docs/artist-information.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Artist Information
|
1
docs/development-environment.md
Normal file
1
docs/development-environment.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Development Environment
|
1
docs/getting-started.md
Normal file
1
docs/getting-started.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Getting Started
|
3
docs/introduction.md
Normal file
3
docs/introduction.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Introduction
|
||||||
|
|
||||||
|
Welcome! This webpage is dedicated to notes and resources for the development team of this game. The sidebar on the left provides links to whatever you may be looking for.
|
Reference in New Issue
Block a user