Skip to content

Commit

Permalink
♻️ Refactor the documentation workflow
Browse files Browse the repository at this point in the history
Always run the workflow, but only push to gh-pages on changes to main
  • Loading branch information
AndreMiras committed Dec 3, 2024
1 parent dfd24d8 commit b27bead
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Documentation

on:
push:
branches:
- main
pull_request:

jobs:
deploy:
Expand Down Expand Up @@ -31,5 +30,8 @@ jobs:
cp --recursive /tmp/docs/. .
echo /node_modules > .gitignore
git add --all
git commit --all --message ":memo: docs: Update generated documentation"
git commit --all --message ":memo: docs: Update generated documentation" || echo "No changes to commit"
- name: push documentation (main branch only)
if: github.ref_name == 'main'
run: |
git push origin gh-pages

0 comments on commit b27bead

Please sign in to comment.