.profile/.github/workflows/main.yaml

36 lines
836 B
YAML
Raw Normal View History

2021-08-03 15:05:50 -04:00
name: README build
on:
push:
branches:
- master
schedule:
2021-08-04 08:16:01 -04:00
- cron: '0 */6 * * *'
2021-08-03 15:05:50 -04:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: setup node
uses: actions/setup-node@v1
with:
node-version: '13.x'
- name: cache
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
env:
OPEN_WEATHER_MAP_KEY: ${{secrets.OPEN_WEATHER_MAP_KEY}}
- name: Push new README.md
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}