Skip to content

Commit

Permalink
updating 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Dec 18, 2023
1 parent 0d202ef commit 587bdcd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/deploy-documents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ jobs:
if [[ "${{ github.event_name }}" == "push" || ( "${{ github.event_name }}" == "create" && "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ) ]]; then
RESULT="true"
else
RESULT="true"
RESULT="false"
fi
echo "result=$RESULT" >> $GITHUB_OUTPUT
echo "Deploy documents: $RESULT"
publish:
runs-on: ubuntu-latest
needs: pre-publish
if: needs.publish-determination.outputs.result == 'true'
if: needs.pre-publish.outputs.result == 'true'

steps:
- name: Checkout repository
Expand All @@ -49,23 +50,37 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Create all generated documentation content
run: mkdocs build

# - name: Create all generated documentation content
# run: mkdocs build
#
- name: Determine versioning parameters
id: determine-versioning
run: echo "data={"version":"5.4.0", "alias"="latest"}" >> $GITHUB_OUTPUT
run: |
# Read the first line from the VERSION file
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 gh-pages branch, we let @ArduinoBot own these commits.
git config --global user.email "deploy@phalcon.io"
git config --global user.name "Phalcon Team Deploy Bot"
# Publishing implies creating a git commit on the production branch,
# we let @phalconbot own these commits.
git config user.name niden
git config user.email nikos@niden.net
git fetch --no-tags --prune --depth=1 origin +refs/heads/production:refs/remotes/origin/production
poetry run mike deploy \
mike deploy \
--update-aliases \
--branch production \
--push \
--remote origin \
${{ fromJson(steps.determine-versioning.outputs.data).version }} \
${{ fromJson(steps.determine-versioning.outputs.data).alias }}
${{ env.PH_DOCS_VERSION }} \
${{ env.PH_DOCS_ALIAS }}
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.1|

0 comments on commit 587bdcd

Please sign in to comment.