Skip to content

Wrote Resultados and Intro.desafios #9

Wrote Resultados and Intro.desafios

Wrote Resultados and Intro.desafios #9

name: Generate README
on:
push:
branches:
- dev
- main
jobs:
merge_markdown:
runs-on: ubuntu-latest
env:
README1: other_resources/baseReadme.md
README2: library/README.md
OUTPUT: README.md
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Merge files
run: |
cat $README1 $README2 > $OUTPUT
if ! git diff --exit-code $OUTPUT; then
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add $OUTPUT
git commit -m "Autogenerated $OUTPUT"
git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} HEAD
else
echo "No changes detected in $OUTPUT, skipping commit."
fi