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 75edd09
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,20 @@ 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'
output:
screenshots_generated: ${{ steps.screenshots.outputs.screenshots_generated }}
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:${{GITHUB_TOKEN}}/github.com/${{GITHUB_REPOSITORY}}.git HEAD:refs/heads/main
Empty file added docs/screenshots/.gitkeep
Empty file.

0 comments on commit 75edd09

Please sign in to comment.