From ff25bd8cf80d09b7679907471ecaa68f7e8c256c Mon Sep 17 00:00:00 2001 From: Andy Nogueira Date: Fri, 1 Dec 2023 11:55:28 -0500 Subject: [PATCH] Added logic to add a staging version (#87) * Github action to deploy to Staging (#82) * added logic to fetch the staging-docs branch and use as default (#86) --- .github/workflows/staging.yml | 2 +- Makefile | 8 ++++++++ VERSIONS | 9 ++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index d9a5f49..e356641 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -23,7 +23,7 @@ jobs: run: make fetch # Generate _data folder content - name: Build versions data - run: make versions-data + run: make STAGING_DOCS=true versions-data # Install Jekyll dependencies - name: Install dependencies run: | diff --git a/Makefile b/Makefile index b6439af..0e04558 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,14 @@ versions-data: echo " visible: true" >> _data/versions.yml; \ echo "output_path: dev" > _data/default_version.yml ; \ fi + @if [ "${STAGING_DOCS}" ]; then \ + echo "Adding \"staging\" version"; \ + echo "- branch: staging-docs" >> _data/versions.yml; \ + echo " output_path: staging" >> _data/versions.yml; \ + echo " visible: true" >> _data/versions.yml; \ + echo "output_path: staging" > _data/default_version.yml ; \ + echo "staging-docs staging true" >> VERSIONS ; \ + fi .PHONY: versions-data check-broken-links: diff --git a/VERSIONS b/VERSIONS index 85c3f2a..a419734 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,5 +1,4 @@ -main main false -v1.x v1 false -v0.34.x v0.34 true -v0.37.x v0.37 true -v0.38.x v0.38 true +main main false +v0.34.x v0.34 true +v0.37.x v0.37 true +v0.38.x v0.38 true