forked from AnOrdinaryUsername/AnOrdinaryUsername
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.01 KB
/
update-readme.yml
File metadata and controls
43 lines (36 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}