Skip to content

Commit

Permalink
Merge pull request #1329 from UncleGrumpy/emergency_doc_fix
Browse files Browse the repository at this point in the history
Fix error in publish docs workflow check

The previous fix would always skip publishing. This sets an environmental
output in the commit files stage that can be checked before pushing changes.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
  • Loading branch information
bettio committed Oct 14, 2024
2 parents d63ea1f + 412232a commit 4b82c37
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
make GitHub_CI_Publish_Docs
- name: Commit files
id: commit_files
if: github.repository == 'atomvm/AtomVM'
working-directory: /home/runner/work/AtomVM/AtomVM/www
run: |
Expand All @@ -122,17 +123,16 @@ jobs:
if [ -n "$(git status --porcelain=v1)" ]; then
git add .
git commit -m "Update Documentation"
echo "PUBLISH=true" >> "$GITHUB_OUTPUT"
fi
- name: Push changes
if: github.repository == 'atomvm/AtomVM'
if: github.repository == 'atomvm/AtomVM' && steps.commit_files.outputs.PUBLISH == 'true'
working-directory: /home/runner/work/AtomVM/AtomVM/www
run: |
if [ -n "$(git status --porcelain=v1)" ]; then
eval `ssh-agent -t 60 -s`
echo "${{ secrets.PUBLISH_ACTION_KEY }}" | ssh-add -
mkdir -p ~/.ssh/
ssh-keyscan github.com >> ~/.ssh/known_hosts
git remote add push_dest "[email protected]:atomvm/atomvm_www.git"
git fetch push_dest
git push --set-upstream push_dest Production
fi
eval `ssh-agent -t 60 -s`
echo "${{ secrets.PUBLISH_ACTION_KEY }}" | ssh-add -
mkdir -p ~/.ssh/
ssh-keyscan github.com >> ~/.ssh/known_hosts
git remote add push_dest "[email protected]:atomvm/atomvm_www.git"
git fetch push_dest
git push --set-upstream push_dest Production

0 comments on commit 4b82c37

Please sign in to comment.