Skip to content

Commit 4b82c37

Browse files
committed
Merge pull request #1329 from UncleGrumpy/emergency_doc_fix
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
2 parents d63ea1f + 412232a commit 4b82c37

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/publish-docs.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113
make GitHub_CI_Publish_Docs
114114
115115
- name: Commit files
116+
id: commit_files
116117
if: github.repository == 'atomvm/AtomVM'
117118
working-directory: /home/runner/work/AtomVM/AtomVM/www
118119
run: |
@@ -122,17 +123,16 @@ jobs:
122123
if [ -n "$(git status --porcelain=v1)" ]; then
123124
git add .
124125
git commit -m "Update Documentation"
126+
echo "PUBLISH=true" >> "$GITHUB_OUTPUT"
125127
fi
126128
- name: Push changes
127-
if: github.repository == 'atomvm/AtomVM'
129+
if: github.repository == 'atomvm/AtomVM' && steps.commit_files.outputs.PUBLISH == 'true'
128130
working-directory: /home/runner/work/AtomVM/AtomVM/www
129131
run: |
130-
if [ -n "$(git status --porcelain=v1)" ]; then
131-
eval `ssh-agent -t 60 -s`
132-
echo "${{ secrets.PUBLISH_ACTION_KEY }}" | ssh-add -
133-
mkdir -p ~/.ssh/
134-
ssh-keyscan github.com >> ~/.ssh/known_hosts
135-
git remote add push_dest "git@github.com:atomvm/atomvm_www.git"
136-
git fetch push_dest
137-
git push --set-upstream push_dest Production
138-
fi
132+
eval `ssh-agent -t 60 -s`
133+
echo "${{ secrets.PUBLISH_ACTION_KEY }}" | ssh-add -
134+
mkdir -p ~/.ssh/
135+
ssh-keyscan github.com >> ~/.ssh/known_hosts
136+
git remote add push_dest "git@github.com:atomvm/atomvm_www.git"
137+
git fetch push_dest
138+
git push --set-upstream push_dest Production

0 commit comments

Comments
 (0)