Skip to content

Commit

Permalink
trying env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Dec 18, 2023
1 parent bad1810 commit eb2642c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/deploy-documents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,21 @@ jobs:
id: determine-versioning
run: |
# Read the first line from the VERSION file
VER=$(head -n 1 ./VERSION)
DATA='data='
DATA+=$VER
echo ${DATA}
echo $DATA >> $GITHUB_ENV
LINE=$(head -n 1 ./VERSION)
# Extract version and alias using parameter expansion
VERSION="${LINE%%|*}"
ALIAS="${LINE#*|}"
# Print the extracted values for verification
echo "Version: $VERSION"
echo "Alias: $ALIAS"
echo "PH_DOCS_VERSION=$VERSION" >> $GITHUB_ENV
echo "PH_DOCS_ALIAS=$ALIAS" >> $GITHUB_ENV
- name: Deploy
if: fromJson(steps.determine-versioning.outputs.data).version != null
if: ${{ env.PH_DOCS_VERSION }} != null
run: |
# Publishing implies creating a git commit on the production branch,
# we let @phalconbot own these commits.
Expand All @@ -75,5 +82,5 @@ jobs:
--update-aliases \
--branch production \
--push \
${{ fromJson(steps.determine-versioning.outputs.data).version }} \
${{ fromJson(steps.determine-versioning.outputs.data).alias }}
${{ env.PH_DOCS_VERSION }} \
${{ env.PH_DOCS_ALIAS }}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"5.4", "alias":""}
5.4|

0 comments on commit eb2642c

Please sign in to comment.