Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: publish-dev
on:
push:
branches:
- 'next'
paths:
- 'source/**'
- '.github/workflows/publish-dev.yml'

workflow_dispatch:

jobs:
publish-dev:
name: publish docs/dev
runs-on: ubuntu-latest
env:
MEILISEARCH_INDEX_KEY: ${{ secrets.MEILISEARCH_INDEX_KEY }}
MEILISEARCH_SEARCH_KEY: ${{ secrets.MEILISEARCH_SEARCH_KEY }}
MEILISEARCH_HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
ADOBE_ANALYTICS_URL: ${{ secrets.ADOBE_ANALYTICS_URL }}
BUCKET_CREDS: ${{ secrets.BUCKET_CREDS }}

steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: install dependencies
run: |
sudo apt update -y
sudo apt-get install -y graphviz fonts-freefont-ttf
pip3 install -U pip
pip3 install -U gsutil==5.27 'pyOpenSSL<24.3.0'
pip3 install --ignore-installed -r requirements.txt

- name: Add latest Fioctl docs
run: |
export fv=$(wget -q -O- https://api.github.com/repos/foundriesio/fioctl/releases/latest | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/')
wget -O /tmp/fioctl https://github.com/foundriesio/fioctl/releases/download/${fv}/fioctl-linux-amd64
chmod +x /tmp/fioctl
/tmp/fioctl gen-rst source/appendix/fioctl-command-reference/

- name: Build docs
run: |
echo "Building dev docs"
mkdir out
make MP_UPDATE_VERSION="dev" OUTDIR=out SPHINXBUILD=sphinx-build html

- name: prepare docs for upload and publish docs
run: |
mv out/html out/dev
cd out
tar -czf offline-docs.tgz dev/
mv offline-docs.tgz dev/
echo $BUCKET_CREDS > secret
echo -e "secret\nY\nosf-prod\nN\n" | gsutil config -e
gsutil -m rsync -d -r dev gs://docs.foundries.io/dev
69 changes: 69 additions & 0 deletions .github/workflows/publish-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: publish-release
on:
push:
tags:
- 'mp-**'

workflow_dispatch:

jobs:
publish-stable:
name: publish docs/stable
runs-on: ubuntu-latest
env:
MEILISEARCH_INDEX_KEY: ${{ secrets.MEILISEARCH_INDEX_KEY }}
MEILISEARCH_SEARCH_KEY: ${{ secrets.MEILISEARCH_SEARCH_KEY }}
MEILISEARCH_HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
ADOBE_ANALYTICS_URL: ${{ secrets.ADOBE_ANALYTICS_URL }}
BUCKET_CREDS: ${{ secrets.BUCKET_CREDS }}
TAG: ${{ github.ref_name }}

steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: install dependencies
run: |
sudo apt update -y
sudo apt-get install -y graphviz fonts-freefont-ttf
pip3 install -U pip
pip3 install -U gsutil==5.27 'pyOpenSSL<24.3.0'
pip3 install --ignore-installed -r requirements.txt

- name: Add latest Fioctl docs
run: |
export fv=$(wget -q -O- https://api.github.com/repos/foundriesio/fioctl/releases/latest | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/')
wget -O /tmp/fioctl https://github.com/foundriesio/fioctl/releases/download/${fv}/fioctl-linux-amd64
chmod +x /tmp/fioctl
/tmp/fioctl gen-rst source/appendix/fioctl-command-reference/

- name: set release name
run: |
echo "release tag: $TAG"
# if [[ $TAG == mp-* ]]; then
export RELEASE="$(echo $TAG | sed -r 's/^.{3}//')"
# else
# export RELEASE="$TAG"
# fi
echo "VERSION=$RELEASE" >> "$GITHUB_ENV"

- name: Build docs
run: |
echo "Building docs $VERSION"
mkdir out
make MP_UPDATE_VERSION="$VERSION" OUTDIR=out SPHINXBUILD=sphinx-build html

- name: prepare docs for upload and publish docs
run: |
mv out/html out/$VERSION
cd out
tar -czf offline-docs.tgz $VERSION/
mv offline-docs.tgz $VERSION/
echo $BUCKET_CREDS > secret
echo -e "secret\nY\nosf-prod\nN\n" | gsutil config -e
gsutil -m rsync -d -r dev gs://docs.foundries.io/$VERSION
# if [[ $TAG == mp-* ]]; then
gsutil -m rsync -d -r gs://docs.foundries.io/${VERSION} gs://docs.foundries.io/latest
fi
19 changes: 0 additions & 19 deletions source/_static/local-dev-switcher.json

This file was deleted.

5 changes: 5 additions & 0 deletions source/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[
{
"name": "dev (unstable)",
"version": "dev",
"url": "https://docs.foundries.io/dev"
},
{
"name": "v96 (stable)",
"version": "96",
Expand Down
32 changes: 7 additions & 25 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# Tags to append to the version, if any.
# (This doesn't affect links to artifacts.)
mp_tags = ''
if mp_version.startswith('git-'):
if mp_version.startswith('git-') or mp_version == 'dev':
if pr == 'False':
mp_tags = 'local-dev'
else:
Expand All @@ -66,7 +66,7 @@
search_version = 'default'

else:
if mp_tags== 'dev' or mp_tags == 'local-dev':
if mp_tags == 'dev' or mp_tags == 'local-dev':
search_version = 'dev'

else:
Expand All @@ -92,7 +92,7 @@

#-- Get version used for link to offline docs page -----------------------------

if mp_version.startswith('git-'):
if mp_version.startswith('git-') or mp_version == 'dev':
gh_release = 'releases'
else:
gh_release = 'releases/tag/mp-' + mp_version
Expand All @@ -114,20 +114,11 @@

# Derive the subscriber tags to use for this build from the
# corresponding version information.
if mp_version.startswith('git-'):
if mp_version.startswith('git-') or mp_version == 'dev':
docker_tag = 'latest'
else:
docker_tag = mp_version

# Provide Git tags for the same information. (This can produce
# somewhat strange command lines for development builds, like cloning
# a repository and checking out master, but it works for subscriber
# updates.)
if mp_version.startswith('git-'):
git_tag = 'main'
else:
git_tag = 'mp-' + mp_version + mp_tags

# And likewise for repo and west manifests (which have a different tag
# namespace than the project tags, that happens to mostly match the
# docker tags.)
Expand All @@ -140,10 +131,6 @@
#parent_dir = dirname(dirname(abspath(__file__)))
#sys.path.insert(0, join(parent_dir, 'extensions'))

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = mp_version
# The full version, including alpha/beta/rc tags.
Expand Down Expand Up @@ -225,10 +212,9 @@
# Standard epilog to be included in all files.
rst_epilog = '''
.. |docker_tag| replace:: {}
.. |git_tag| replace:: {}
.. |manifest_tag| replace:: {}
.. |fioctl_version| replace:: {}
'''.format(docker_tag, git_tag, manifest_tag, fioctl_version)
'''.format(docker_tag, manifest_tag, fioctl_version)

# -- PDF Configuration --------------------------------------------------------

Expand All @@ -251,12 +237,8 @@
json_url = 'https://docs.foundries.io/latest/_static/switcher.json'
version_match = release
if "dev" in release:
version_match = 'dev'
if mp_tags == 'local-dev':
json_url = '_static/local-dev-switcher.json'
if mp_tags == 'dev':
json_url = 'https://raw.githubusercontent.com/foundriesio/docs/refs/main/next/source/_static/switcher.json'

version_match= 'dev'
json_url = 'https://raw.githubusercontent.com/foundriesio/docs/refs/heads/next/source/_static/switcher.json'
# Pydata Theme options
html_theme_options = {
'pygments_light_style': 'default',
Expand Down
4 changes: 2 additions & 2 deletions source/user-guide/lmp-customization/linux-building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Setup

$ mkdir -p ~/lmp/sstate-cache ~/lmp/downloads ~/lmp/build

#. Run |version| of the container as the ``builder`` user:
#. Run the container as the ``builder`` user:

.. parsed-literal::

Expand All @@ -117,7 +117,7 @@ The `Google Repo`_ tool fetches Git repos at known-good revisions, and keeps the

$ cd build/lmp

#. Fetch release |version| using :term:`Repo`:
#. Fetch release using :term:`Repo`:

.. parsed-literal::

Expand Down
Loading