Skip to content

Instantly share code, notes, and snippets.

@Eversmile12
Last active January 30, 2021 09:59
Show Gist options
  • Save Eversmile12/93f1039d312b4d06d213df2c6a049cf2 to your computer and use it in GitHub Desktop.
Save Eversmile12/93f1039d312b4d06d213df2c6a049cf2 to your computer and use it in GitHub Desktop.
name: README build
on:
push:
branches: [ main ]
schedule:
- cron: '0 */6 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository to Master branch
uses: actions/checkout@v2
- name: Setup NodeJs
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache dependencies and build outputs to improve workflow execution time.
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-js-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Generate README file
run: node index.js
- name: Commit and Push new README.md to repository
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'main'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment