Build README #2694
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: Build README | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 7-23/2 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout project source code | |
- uses: actions/checkout@v4 | |
- name: Use NodeJs 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- name: Cache npm dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm install | |
- name: Generate updated README file | |
run: npm start | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
- name: Commit and Push new README.md to the repository | |
uses: mikeal/publish-to-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |