GitHub Action Workflow¶
Create the Workflow File¶
In your repository, create the workflow directory and file:
- Navigate to your repository on GitHub
- Create a new file at:
.github/workflows/steam-stats.yml
- Add the following content:
name: Steam Stats permissions: # Least privilege for GitHub Actions contents: read on: workflow_dispatch: schedule: # Runs every Monday at 12 AM IST (UTC+5:30) - cron: "30 18 * * 0" jobs: steam-stats: name: Steam Stats runs-on: ubuntu-latest steps: - name: Steam Stats uses: nicconike/steam-stats@master with: STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }} STEAM_ID: ${{ vars.STEAM_ID }} STEAM_CUSTOM_ID: ${{ vars.STEAM_CUSTOM_ID }} WORKSHOP_STATS: True # Optional LOG_SCALE: True # Optional
Enable Log Scale for Recently Played Games¶
By default, the Recently Played Games chart uses a linear Y-axis. To visualize games with vastly different playtimes more effectively, enable logarithmic scaling:
- Add
LOG_SCALE: True
under yourwith:
inputs (as shown above). - Commit and push your workflow file.
Linear Scale Example:
Log Scale Example:
Workflow Explanation¶
schedule
: Automatically runs weekly every Monday midnight at 12 AM IST (default)workflow_dispatch
: Allows you to manually trigger the workflowuses: Nicconike/Steam-Stats@master
: Runs the Steam Stats action which fetches data, generates cards and commits them- Inputs:
STEAM_API_KEY
: Your Steam Web API key (from repository secrets)STEAM_ID
andSTEAM_CUSTOM_ID
: Your numeric SteamID64 and custom IDWORKSHOP_STATS
:True
to enable Workshop stats (optional)LOG_SCALE
:True
to use logarithmic scale on the Recently Played Games chart (optional)
No additional commit steps are required, Steam Stats automatically updates your README