From d846d39b4e5afd19bbac1f7368cafb92a11e6723 Mon Sep 17 00:00:00 2001 From: Katrina Prosise Date: Thu, 16 Apr 2026 04:01:21 -0400 Subject: [PATCH] Test publish on tag Using dev to test publishing when a tag is added. The new file will eventually be used for publishing the stable docs, but may be publishing to dev while potential issues are worked out. Signed-off-by: Katrina Prosise --- .github/workflows/publish-main.yml | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/publish-main.yml diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml new file mode 100644 index 00000000..000b9fbe --- /dev/null +++ b/.github/workflows/publish-main.yml @@ -0,0 +1,53 @@ +name: publish-dev +on: + push: + tags: + - '**' + 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: | + 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