forked from atomvm/AtomVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request atomvm#828 from UncleGrumpy/publish_docs
Publish documentation for tag releases
- Loading branch information
Showing
4 changed files
with
131 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# | ||
# Copyright 2023 Winford (Uncle Grumpy) <winford@object.stream> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later | ||
# | ||
# This is a workflow for atomvm/AtomVM to Publish API documentation and other content from the `doc` directory to | ||
# atomvm.net hosted on GitHub Pages | ||
|
||
name: Build Docs | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push request and tag events on master branch | ||
pull_request: | ||
branches: | ||
- 'master' | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- '!master' | ||
paths: | ||
- '.github/workflows/**' | ||
- 'CMakeLists.txt' | ||
- 'doc/**' | ||
- 'libs/**' | ||
- 'src/libAtomVM/**' | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref != 'refs/heads/master' && github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
|
||
- name: Install Deps | ||
run: | | ||
sudo apt update -y | ||
DEBIAN_FRONTEND=noninteractive sudo apt install -y git cmake doxygen graphviz python3-pip python3-virtualenv python3-setuptools python3-stemmer wget | ||
- uses: actions/cache@v3 | ||
id: sphinx-cache | ||
with: | ||
path: /home/runner/python-env/sphinx | ||
key: ${{ runner.os }}-sphinx-install | ||
|
||
- name: Install Sphinx | ||
if: steps.cache.outputs.sphinx-cache-hit != 'true' | ||
run: | | ||
python3 -m venv /home/runner/python-env/sphinx | ||
. /home/runner/python-env/sphinx/bin/activate | ||
python3 -m pip install sphinx | ||
python3 -m pip install myst-parser | ||
python3 -m pip install sphinx-rtd-theme | ||
python3 -m pip install rinohtype | ||
python3 -m pip install pillow | ||
python3 -m pip install gitpython | ||
python3 -m pip install breathe | ||
python3 -m pip install pygments | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: "25" | ||
elixir-version: "1.15" | ||
|
||
- name: Install rebar3 | ||
working-directory: /tmp | ||
run: | | ||
wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3 | ||
./rebar3 local install | ||
echo "/home/runner/.cache/rebar3/bin" >> ${GITHUB_PATH} | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ vars.GITHUB_REPOSITORY }} | ||
fetch-depth: 0 | ||
|
||
- name: Build Site | ||
shell: bash | ||
run: | | ||
. /home/runner/python-env/sphinx/bin/activate | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cd doc | ||
make GitHub_CI_Publish_Docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters