Skip to content

Automate documentation generation #196

Automate documentation generation

Automate documentation generation #196

Workflow file for this run

name: Documentation
on:
push:
branches:
- 'master'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- 'docs/*'
- '*.yml'
- '*.md'
- 'LICENSE'
# on:
# pull_request_target:
# types:
# - closed
# branches:
# - master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
docgen:
runs-on: macos-latest
name: Generator
defaults:
run:
shell: bash
steps:
- name: Install Arturo
uses: arturo-lang/arturo-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
mode: docgen
arch: arm64
src: ${{ github.ref }}
metadata: ${{ env.BRANCH_NAME }}-${{ github.sha }}
- name: "Install Node"
uses: actions/setup-node@v4
with:
node-version: latest
- name: "Install Ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: "Install gems"
run: |
gem install commonmarker
- name: "Install prerequisites"
run: |
sudo apt-get update
sudo apt-get install webp
sudo npm install -g sass uglify-js
- name: "Generate website"
run: |
ls -la arturo
cd arturo
arturo tools/sitegen.art
mkdir tmpdocs
cd docs/website
arturo ../../tools/miniwebize/webize.art --build --at: ../../tmpdocs
cd ..
- name: Synchronize
uses: burnett01/[email protected]
with:
switches: -avzr --delete
path: arturo/tmpdocs/
remote_path: /var/www/arturo-lang.io/master
remote_host: arturo-lang.io
remote_user: root
remote_key: ${{ secrets.DOCUMENTATION_DEPLOYMENT }}
- name: Upload artifact
uses: 'actions/upload-artifact@v4'
with:
name: tmpdocs
path: arturo/tmpdocs