Update deploy.yml #7
This file contains hidden or 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: Generate address image and push to gh-pages | |
| on: | |
| push: | |
| branches: [master] # oder main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v3 | |
| - name: Install ImageMagick | |
| run: sudo apt-get update && sudo apt-get install -y imagemagick | |
| - name: Generate address image | |
| env: | |
| ADDRESS: ${{ secrets.ADDRESS_PLAIN }} | |
| run: | | |
| mkdir out | |
| echo "$ADDRESS" | convert -background white -fill black -font Helvetica -pointsize 16 text:- out/adresse.png | |
| - name: Force-push adresse.png to gh-pages branch (clean) | |
| run: | | |
| cd out | |
| git init | |
| git config user.name "github-actions" | |
| git config user.email "actions@github.com" | |
| git add adresse.png | |
| git commit -m "Deploy fresh adresse.png" | |
| git branch -M gh-pages | |
| git remote add origin https://github.com/${{ github.repository }} | |
| git push --force origin gh-pages |