fetch-data #33
This file contains 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: fetch-data | |
on: | |
workflow_dispatch | |
jobs: | |
fetch-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Install Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install requests==2.28.1 beautifulsoup4==4.11.1 pandas==1.5.0 | |
- name: Scrape RTD analytics data | |
run: python scrape_readthedocs.py | |
env: | |
# copy GitHub Secrets into environment variables | |
RTD_USERNAME: ${{ secrets.RTD_USERNAME }} | |
RTD_PASSWORD: ${{ secrets.RTD_PASSWORD }} | |
- name: Push new data files back to repo | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "AUTO: update RTD data files" |