Skip to content

.github/workflows/update.yml #158

.github/workflows/update.yml

.github/workflows/update.yml #158

Workflow file for this run

on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v3
with:
path: |
node_modules
key: node-v${{ matrix.node-version }}-deps-${{ hashFiles('./yarn.lock') }}
- name: Yarn Install
run: |
yarn install
- name: Update sites
run: |
yarn run do
- name: Commit files
run: |
git add -N . # 新規ファイルを含める
if ! git diff --exit-code --quiet
then
git config --local user.email "[email protected]"
git config --local user.name "su-u"
git add .
git commit -m "Update: github actions"
git push
fi