Skip to content

clean old doc files

clean old doc files #3

name: Docs
on:
push:
branches:
- main
jobs:
update_docs:
name: Update Docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install PonyC, Corral, MkDocs
run: |
mkdir -p ./ponyc
wget -q https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest/ponyc-x86-64-unknown-linux-ubuntu22.04.tar.gz
tar xzf ponyc-x86-64-unknown-linux-ubuntu22.04.tar.gz --directory ./ponyc --strip-components=1
mkdir -p ./corral
wget -q https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest/corral-x86-64-unknown-linux.tar.gz
tar xzf corral-x86-64-unknown-linux.tar.gz --directory ./corral --strip-components=1
pip install mkdocs
pip install mkdocs-material
- name: Build Docs
run: |
export PATH=`pwd`/ponyc/bin:`pwd`/corral/bin:$PATH
corral fetch
PONYC=./ponyc/bin/ponyc make docs
cd build/kiuatan-docs
export SITE_NAME="Kiuatan `cat ../../VERSION`-`git rev-parse --short --verify HEAD`"
sed -i "s/site_name:.*/site_name: $SITE_NAME/" mkdocs.yml
python -m mkdocs build --quiet
- name: Checkout Docs Site
uses: actions/checkout@v4
with:
repository: chalcolith/chalcolith.github.io
token: ${{ secrets.DOCS_SITE_ACCESS_TOKEN }}
ref: main
path: chalcolith.github.io
fetch-depth: 0
- name: Copy Files and Commit
run: |
cd ./chalcolith.github.io
git rm -r -f --quiet ./kiuatan/
cd ..
mkdir -p ./chalcolith.github.io/kiuatan
cp -a ./build/kiuatan-docs/site/* ./chalcolith.github.io/kiuatan
cd ./chalcolith.github.io
git add .
git config user.name "Kiuatan GitHub Actions"
git config user.email "<>"
git commit -m "Updated Kiuatan documentation on `date`"
git push