[ci] Use correct ImageMagick command #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy preview output image | |
on: | |
# Run when new commits are pushed to the main branch... | |
push: | |
branches: [ "main" ] | |
# ...or whenever I tell it to do so | |
workflow_dispatch: | |
jobs: | |
main: | |
name: Generate preview output image and deploy | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- name: 📲 Checkout repository | |
uses: actions/checkout@v3 | |
- name: 🎨 Generate an output image | |
shell: powershell | |
run: | | |
Import-Module .\Sources\PSRaytracing.psm1 | |
Invoke-Raytracing ` | |
-ImageWidth 640 ` | |
-ImageHeight 360 ` | |
-OutputFile "new-output.ppm" | |
- name: 🔗 Checkout `result` branch | |
uses: actions/checkout@v3 | |
with: | |
ref: result | |
path: result | |
- name: ✨ Update image | |
run: | | |
magick.exe .\new-output.ppm .\new-output.png | |
cd result | |
cp ..\new-output.png .\output.png | |
- name: 🚀 Commit and push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
cwd: ./result | |
add: output.png | |
default_author: github_actor |