Skip to content

Update ArkDoc documentation #177

Update ArkDoc documentation

Update ArkDoc documentation #177

Workflow file for this run

name: Update ArkDoc documentation
on:
schedule:
- cron: "0 2 * * sun"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout website
uses: actions/checkout@v2
- name: Checkout ArkDoc
uses: actions/checkout@v2
with:
repository: ArkScript-lang/ArkDoc
path: './arkdoc'
ref: 'v0.2.2'
- name: Checkout std
uses: actions/checkout@v2
with:
repository: ArkScript-lang/std
path: './std-latest'
- name: Checkout ArkScript
uses: actions/checkout@v2
with:
repository: ArkScript-lang/Ark
path: './ark-latest'
ref: 'master'
# so that we can fetch tags
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Pip install
run: |
cd arkdoc/
pip install -r requirements.txt
- name: Generate documentation
shell: bash
run: |
ark_version=$(cd ark-latest; git describe --tags)
echo "New ArkScript tag: ${ark_version}"
# run arkdoc
cd arkdoc
export ARKDOC_LOGLEVEL=DEBUG
python -m arkdoc $ark_version ../std-latest/ ../ark-latest/src/arkreactor/Builtins/ --html std --root /std || exit 1
cd ..
cp -r arkdoc/std/ ./
# update version
sed "s/let version = "'"'".\+"'"'"/let version = "'"'"${ark_version}"'"'"/g" ./std/index.html > temp_index.html
rm ./std/index.html
mv temp_index.html ./std/index.html
- name: Commit
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'master'
commit-message: 'Updating ArkScript std documentation'
force-add: 'true'
files: ./std/
name: Alexandre Plateau through GitHub Action
email: [email protected]