|
9 | 9 | on:
|
10 | 10 | push:
|
11 | 11 | branches:
|
12 |
| - # Branch to base "dev" website on. Set in siteversion.py also. |
| 12 | + # Branch to base "dev" website on. |
13 | 13 | - master
|
14 | 14 | # Release branches have names like 0.8.x, 0.9.x, ...
|
15 | 15 | - "[0-9]+.[0-9]+.x"
|
@@ -66,34 +66,56 @@ jobs:
|
66 | 66 |
|
67 | 67 | - name: Determine versioning parameters
|
68 | 68 | id: determine-versioning
|
69 |
| - run: | |
70 |
| - # Read the first line from the VERSION file |
71 |
| - LINE=$(head -n 1 ./VERSION) |
72 |
| - |
73 |
| - # Extract version and alias using parameter expansion |
74 |
| - VERSION="${LINE%%|*}" |
75 |
| - ALIAS="${LINE#*|}" |
76 |
| - |
77 |
| - # Print the extracted values for verification |
78 |
| - echo "Version: $VERSION" |
79 |
| - echo "Alias: $ALIAS" |
80 |
| - |
81 |
| - echo "PH_DOCS_VERSION=$VERSION" >> $GITHUB_ENV |
82 |
| - echo "PH_DOCS_ALIAS=$ALIAS" >> $GITHUB_ENV |
| 69 | + run: echo "data=$(poetry run python siteversion.py)" >> $GITHUB_OUTPUT |
83 | 70 |
|
84 |
| - - name: Deploy |
85 |
| - if: ${{ env.PH_DOCS_VERSION }} != null |
| 71 | + - name: Publish documentation |
| 72 | + if: fromJson(steps.determine-versioning.outputs.data).version != null |
86 | 73 | run: |
|
87 | 74 | # Publishing implies creating a git commit on the production branch,
|
88 | 75 | # We will need to create a user for this at some point
|
89 | 76 | echo "Deploying with Mike"
|
90 | 77 | git config user.name niden
|
91 | 78 | git config user.email [email protected]
|
92 | 79 | git fetch --no-tags --prune --depth=1 origin +refs/heads/production:refs/remotes/origin/production
|
93 |
| - mike deploy \ |
| 80 | + poetry run mike deploy \ |
94 | 81 | --update-aliases \
|
95 |
| - --branch production \ |
96 | 82 | --push \
|
97 |
| - ${{ env.PH_DOCS_VERSION }} \ |
98 |
| - ${{ env.PH_DOCS_ALIAS }} |
| 83 | + --remote origin \ |
| 84 | + ${{ fromJson(steps.determine-versioning.outputs.data).version }} \ |
| 85 | + ${{ fromJson(steps.determine-versioning.outputs.data).alias }} |
99 | 86 | echo "Deployed"
|
| 87 | +
|
| 88 | +# |
| 89 | +# - name: Determine versioning parameters |
| 90 | +# id: determine-versioning |
| 91 | +# run: | |
| 92 | +# # Read the first line from the VERSION file |
| 93 | +# LINE=$(head -n 1 ./VERSION) |
| 94 | +# |
| 95 | +# # Extract version and alias using parameter expansion |
| 96 | +# VERSION="${LINE%%|*}" |
| 97 | +# ALIAS="${LINE#*|}" |
| 98 | +# |
| 99 | +# # Print the extracted values for verification |
| 100 | +# echo "Version: $VERSION" |
| 101 | +# echo "Alias: $ALIAS" |
| 102 | +# |
| 103 | +# echo "PH_DOCS_VERSION=$VERSION" >> $GITHUB_ENV |
| 104 | +# echo "PH_DOCS_ALIAS=$ALIAS" >> $GITHUB_ENV |
| 105 | +# |
| 106 | +# - name: Deploy |
| 107 | +# if: ${{ env.PH_DOCS_VERSION }} != null |
| 108 | +# run: | |
| 109 | +# # Publishing implies creating a git commit on the production branch, |
| 110 | +# # We will need to create a user for this at some point |
| 111 | +# echo "Deploying with Mike" |
| 112 | +# git config user.name niden |
| 113 | +# git config user.email [email protected] |
| 114 | +# git fetch --no-tags --prune --depth=1 origin +refs/heads/production:refs/remotes/origin/production |
| 115 | +# mike deploy \ |
| 116 | +# --update-aliases \ |
| 117 | +# --remote origin \ |
| 118 | +# --push \ |
| 119 | +# ${{ env.PH_DOCS_VERSION }} \ |
| 120 | +# ${{ env.PH_DOCS_ALIAS }} |
| 121 | +# echo "Deployed" |
0 commit comments