Skip to content

Commit

Permalink
feat: add screenshots generation in cd
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Mar 10, 2024
1 parent d477202 commit 1fcea85
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,18 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: metro-travel.vincenthardouin.dev
cname: metro-travel.vincenthardouin.dev

- name: Generate Screenshots
id: screenshots
if: steps.semantic.outputs.new_release_published == 'true' && steps.semantic.outputs.new_release_patch_version == '0'
run: (npm start &); npm run screenshots && echo "screenshots_generated=true" >> $GITHUB_OUTPUT

- name: Commit & push screenshots
if: steps.screenshots.outputs.screenshots_generated == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add docs/
&& git commit -m "docs: include screenshots for version ${{steps.semantic.outputs.new_release_published}} [skip ci]"
&& git push https://x-access-token:${{ env.GITHUB_TOKEN }}/github.com/${{ vars.GITHUB_REPOSITORY }}.git HEAD:refs/heads/main
Empty file added docs/screenshots/.gitkeep
Empty file.

0 comments on commit 1fcea85

Please sign in to comment.