Skip to content

Commit a22c1b2

Browse files
committed
Make refinements to publishing workflows
Cleanup and further work made to both publishing workflows. publish-dev now echos when building docs, publish-main has logic for handling different tag cases, and passing info between steps. No QA steps done. This commit applies to Jira FFTK-4116, "Publish…GitHub Actions" Signed-off-by: Katrina Prosise <katrina.prosise@foundries.io>
1 parent 1650565 commit a22c1b2

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

.github/workflows/publish-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
4444
- name: Build docs
4545
run: |
46+
echo "Building dev docs"
4647
mkdir out
4748
make MP_UPDATE_VERSION="dev" OUTDIR=out SPHINXBUILD=sphinx-build html
4849

.github/workflows/publish-main.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: publish-stable
1+
name: publish-release
22
on:
33
push:
44
tags:
5-
- 'mp-**'
5+
- '**'
66
workflow_dispatch:
77

88
jobs:
@@ -15,7 +15,7 @@ jobs:
1515
MEILISEARCH_HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
1616
ADOBE_ANALYTICS_URL: ${{ secrets.ADOBE_ANALYTICS_URL }}
1717
BUCKET_CREDS: ${{ secrets.BUCKET_CREDS }}
18-
RELEASE: ${{ github.ref_name }}
18+
TAG: ${{ github.ref_name }}
1919

2020
steps:
2121
- uses: actions/checkout@v6
@@ -38,23 +38,28 @@ jobs:
3838
chmod +x /tmp/fioctl
3939
/tmp/fioctl gen-rst source/appendix/fioctl-command-reference/
4040
41-
- name: Build docs
41+
- name: set release name
4242
run: |
43-
echo "Building docs: $RELEASE"
44-
if [[ $RELEASE == mp-* ]]; then
45-
export release="$(echo $RELEASE | sed -r 's/^.{3}//')"
43+
echo "release tag: $TAG"
44+
if [[ $TAG == mp-* ]]; then
45+
export RELEASE="$(echo $TAG | sed -r 's/^.{3}//')"
4646
else
47-
export release = $RELEASE
47+
export RELEASE = $TAG
4848
fi
49+
echo "VERSION=$RELEASE" >> "$GITHUB_ENV"
50+
51+
- name: Build docs
52+
run: |
53+
echo "Building docs $VERSION
4954
mkdir out
50-
make MP_UPDATE_VERSION="$release" OUTDIR=out SPHINXBUILD=sphinx-build html
55+
make MP_UPDATE_VERSION="$VERSION" OUTDIR=out SPHINXBUILD=sphinx-build html
5156
5257
- name: prepare docs for upload and publish docs
5358
run: |
54-
mv out/html out/dev
59+
mv out/html out/$VERSION
5560
cd out
56-
tar -czf offline-docs.tgz dev/
57-
mv offline-docs.tgz dev/
61+
tar -czf offline-docs.tgz $VERSION/
62+
mv offline-docs.tgz $VERSION/
5863
echo $BUCKET_CREDS > secret
5964
echo -e "secret\nY\nosf-prod\nN\n" | gsutil config -e
60-
gsutil -m rsync -d -r dev gs://docs.foundries.io/dev
65+
gsutil -m rsync -d -r dev gs://docs.foundries.io/$VERSION

0 commit comments

Comments
 (0)