Download MLJ Cheatsheet #2014
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: Download MLJ Cheatsheet | |
| on: | |
| schedule: | |
| - cron: "0 */6 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| download-and-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Create directory if it does not exist | |
| run: mkdir -p src/lib/Data | |
| - name: Download file | |
| run: | | |
| curl -o src/lib/Data/mlj_cheatsheet.md https://raw.githubusercontent.com/JuliaAI/MLJ.jl/dev/docs/src/mlj_cheatsheet.md | |
| - name: Commit changes | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "actions@users.noreply.github.com" | |
| git add src/lib/Data/mlj_cheatsheet.md | |
| echo "Checking to see if there is something to commit. " | |
| if ! git diff --staged --quiet; then | |
| git commit -m "⬆️ Update MLJ cheatsheet from MLJ.jl" | |
| git push | |
| else | |
| echo "No changes to commit. Skipping." | |
| fi |