Skip to content

Build HTML Docs

Build HTML Docs #68059

Workflow file for this run

name: Build HTML Docs
on:
push:
branches:
- docs
- blog
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- name: Checkout Build Files
uses: actions/checkout@v2
with:
persist-credentials: false
ref: docs
- name: Checkout OpenCorePkg Master
uses: actions/checkout@v2
with:
persist-credentials: false
repository: acidanthera/OpenCorePkg
path: latest
- name: Get Latest OpenCorePkg Release
uses: oprypin/find-latest-tag@v1
with:
repository: acidanthera/OpenCorePkg
releases-only: true
id: releasetag
- run: echo "Latest release is ${{ steps.releasetag.outputs.tag }}"
- name: Checkout OpenCorePkg Release
uses: actions/checkout@v2
with:
persist-credentials: false
repository: acidanthera/OpenCorePkg
path: release
ref: ${{ steps.releasetag.outputs.tag }}
- run: brew update
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Get Latest MacTeX Version
id: mactexversion
run: |
echo "version=$(brew info --cask basictex | head -1 | cut -c 11-)" >> $GITHUB_OUTPUT
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Cache Brew Downloads
uses: actions/cache@v2
with:
path: |
~/Library/Caches/Homebrew/downloads/*tex*
~/Library/Caches/Homebrew/downloads/*ghostscript*
~/Library/Caches/Homebrew/*tex*
~/Library/Caches/Homebrew/*ghostscript*
key: ${{ runner.os }}-basictex-${{ steps.mactexversion.outputs.version }}
- name: Install Dependencies
run: |
brew install --cask basictex
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Refresh PATH
run: |
eval "$(/usr/libexec/path_helper)"
echo "$PATH" >> $GITHUB_PATH
- uses: shogo82148/actions-setup-perl@v1
- name: Install LaTeX Dependencies
run: |
sudo tlmgr update --self
sudo tlmgr update texlive-scripts
sudo tlmgr install titlesec pgf datetime fmtcount zref hyperref zlmtt make4ht luaxml tex4ht context latexdiff
cpanm Algorithm::Diff
- name: Build Master Configuration
run: |
cd latest/Docs
sed -i '' 's/-s ONLYCHANGEDPAGE //' BuildDocs.tool
./BuildDocs.tool
make4ht Configuration.tex
- name: Build Master Differences
run: |
cd latest/Docs/Differences
make4ht Differences.tex
- name: Build Master Errata
run: |
cd latest/Docs/Errata
make4ht Errata.tex
- name: Build Release Configuration
run: |
cd release/Docs
sed -i '' 's/-s ONLYCHANGEDPAGE //' BuildDocs.tool
./BuildDocs.tool
make4ht Configuration.tex
- name: Build Release Differences
run: |
cd release/Docs/Differences
make4ht Differences.tex
- name: Copy Files
run: |
mkdir -p Deploy/latest Deploy/release
cp -R latest/Docs/*.css latest/Docs/*.html latest/Docs/*.png latest/Docs/Differences/*.css latest/Docs/Differences/*.html latest/Docs/Differences/*.png latest/Docs/Errata/*.css latest/Docs/Errata/*.html latest/Docs/Errata/*.png latest/Docs/Logos Deploy/latest/ || true
cp -R release/Docs/*.css release/Docs/*.html release/Docs/*.png release/Docs/Differences/*.css release/Docs/Differences/*.html release/Docs/Differences/*.png release/Docs/Errata/*.css release/Docs/Errata/*.html release/Docs/Errata/*.png release/Docs/Logos Deploy/release/ || true
cp Copy/Differences.css Deploy/latest/
cp Copy/Differences.css Deploy/release/
cp Copy/README.md Copy/main.css Deploy/
echo
ls Deploy
- name: Post Build
run: python3 postbuild.py ${{ steps.releasetag.outputs.tag }}
- name: Deploy
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: master
folder: Deploy
target-folder: docs
- name: Upload Latest Docs
uses: actions/[email protected]
with:
name: latest
path: latest/Docs
- name: Upload Release Docs
uses: actions/[email protected]
with:
name: release
path: release/Docs
- name: Upload HTML Output
uses: actions/[email protected]
with:
name: html
path: Deploy