Skip to content

Commit 7c86cc8

Browse files
committed
Merge pull request #1337 from bettio/fix-ci-publish-conditional-logic
CI: publish-docs: fix conditional logic CI was green but it wasn't publishing updated doc. Actually, it wasn't even making a commit. 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 dc8a91f + 0235723 commit 7c86cc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/publish-docs.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,13 @@ jobs:
121121
if: github.repository == 'atomvm/AtomVM'
122122
working-directory: /home/runner/work/AtomVM/AtomVM/www
123123
run: |
124-
git checkout Production
125124
git config --local user.email "atomvm-doc-bot@users.noreply.github.com"
126125
git config --local user.name "AtomVM Doc Bot"
127126
ls -la doc/
128127
git add .
129-
git diff --exit-code || git commit -m "Update Documentation"
128+
git diff --exit-code Production || echo "Going to commit"
129+
git diff --exit-code Production || git commit -m "Update Documentation"
130+
git log -1
130131
- name: Push changes
131132
if: github.repository == 'atomvm/AtomVM'
132133
working-directory: /home/runner/work/AtomVM/AtomVM/www
@@ -140,4 +141,5 @@ jobs:
140141
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts
141142
git remote add push_dest "git@github.com:atomvm/atomvm_www.git"
142143
git fetch push_dest
144+
git diff --exit-code push_dest/Production || echo "Going to push"
143145
git diff --exit-code push_dest/Production || git push --set-upstream push_dest Production

0 commit comments

Comments
 (0)