# This workflow automatically updates the profile README. It runs the update_readme.py script once per day. That script builds a new README file which includes some recent posts from freeCodeCamp.org name: Update profile README on: schedule: - cron: '0 0 * * *' # Runs every day at midnight UTC workflow_dispatch: # Allows manual triggering of the workflow permissions: contents: write # Ensure the GITHUB_TOKEN has write permissions jobs: update-readme: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.x' - name: Install dependencies run: | python -m pip install --upgrade pip pip install requests feedparser - name: Run update script run: python update_readme.py - name: Commit and push changes run: | git config --global user.name 'new2code' git config --global user.email 'docs-learner-profile@github.com' git add README.md git commit -m 'Update README with latest posts' git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}