README build #3824
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: README build | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' # Run every day at midnight UTC | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repository to main branch | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Setup Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Cache dependencies and build outputs | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Generate README file | |
run: node index.js | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Commit and Push new README.md to the repository | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update README.md [skip ci] | |
commit_options: '--no-verify' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |