Skip to content

Commit 159a2e2

Browse files
committed
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 <katrina.prosise@foundries.io>
1 parent 9f05b12 commit 159a2e2

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/publish-main.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: publish-dev
2+
on:
3+
push:
4+
tags:
5+
- '**'
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish-dev:
10+
name: publish docs/dev
11+
runs-on: ubuntu-latest
12+
env:
13+
MEILISEARCH_INDEX_KEY: ${{ secrets.MEILISEARCH_INDEX_KEY }}
14+
MEILISEARCH_SEARCH_KEY: ${{ secrets.MEILISEARCH_SEARCH_KEY }}
15+
MEILISEARCH_HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
16+
ADOBE_ANALYTICS_URL: ${{ secrets.ADOBE_ANALYTICS_URL }}
17+
BUCKET_CREDS: ${{ secrets.BUCKET_CREDS }}
18+
19+
steps:
20+
- uses: actions/checkout@v6
21+
- uses: actions/setup-python@v6
22+
with:
23+
python-version: '3.13'
24+
25+
- name: install dependencies
26+
run: |
27+
sudo apt update -y
28+
sudo apt-get install -y graphviz fonts-freefont-ttf
29+
pip3 install -U pip
30+
pip3 install -U gsutil==5.27 'pyOpenSSL<24.3.0'
31+
pip3 install --ignore-installed -r requirements.txt
32+
33+
- name: Add latest Fioctl docs
34+
run: |
35+
export fv=$(wget -q -O- https://api.github.com/repos/foundriesio/fioctl/releases/latest | grep tag_name | sed -E 's/.*"([^"]+)".*/\1/')
36+
wget -O /tmp/fioctl https://github.com/foundriesio/fioctl/releases/download/${fv}/fioctl-linux-amd64
37+
chmod +x /tmp/fioctl
38+
/tmp/fioctl gen-rst source/appendix/fioctl-command-reference/
39+
40+
- name: Build docs
41+
run: |
42+
mkdir out
43+
make MP_UPDATE_VERSION="dev" OUTDIR=out SPHINXBUILD=sphinx-build html
44+
45+
- name: prepare docs for upload and publish docs
46+
run: |
47+
mv out/html out/dev
48+
cd out
49+
tar -czf offline-docs.tgz dev/
50+
mv offline-docs.tgz dev/
51+
echo $BUCKET_CREDS > secret
52+
echo -e "secret\nY\nosf-prod\nN\n" | gsutil config -e
53+
gsutil -m rsync -d -r dev gs://docs.foundries.io/dev

0 commit comments

Comments
 (0)