Skip to content

Build & Deploy to GitHub Pages #8

Build & Deploy to GitHub Pages

Build & Deploy to GitHub Pages #8

Workflow file for this run

name: Build & Deploy to GitHub Pages
on:
push:
branches:
- main
schedule:
- cron: "0 5 * * 0"
workflow_dispatch:
permissions: {}
env:
NEODOC_VERSION: 0.1.6
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- run: pnpm install
- run: pnpm build
# Install mono
- name: Install mono
run: sudo apt-get install -y mono-complete
- uses: actions/checkout@v4
# ttt2 repo in subfolder
with:
repository: "TTT-2/TTT2"
path: "ttt2"
- name: Get NeoDoc
run: |
wget -c https://github.com/TTT-2/NeoDoc/releases/download/v${NEODOC_VERSION}/NeoDoc-v${NEODOC_VERSION}.zip -O neodoc.zip
unzip -u neodoc.zip
rm neodoc.zip
- name: Generate Documentation
run: |
mkdir -p output
mono NeoDoc.exe ttt2 output || exit_code=$?
- name: Move generated data
run: mv output dist/data
- uses: actions/upload-pages-artifact@v3
with:
path: "dist"
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4