Generate Sankey Diagram #2
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 Sankey Diagram | |
| on: | |
| push: | |
| paths: | |
| - sankey.txt | |
| - src/sankey-settings.txt | |
| workflow_dispatch: | |
| jobs: | |
| generate-sankey: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Generate sankey diagram | |
| run: | | |
| cat src/sankey-settings.txt >> sankey.txt | |
| response=$(curl -s -X POST --data-binary @sankey.txt https://sankey.nicoo.org) | |
| echo "$response" > src/sankey.svg | |
| - name: Commit and push sankey diagram | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add src/sankey.svg | |
| git commit -m 'Updated sankey diagram' | |
| git push |