Upgrade Website Dependencies #600
This file contains 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: Upgrade Website Dependencies | |
on: | |
schedule: | |
- cron: '0 21 * * *' # everyday, 21:00 (UTC) | |
workflow_dispatch: | |
jobs: | |
upgrade_website_dependencies: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/actions/setup-node/issues/206#issuecomment-774538395 | |
- uses: nodenv/actions/node-version@main | |
id: nodenv | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '${{ steps.nodenv.outputs.node-version }}' | |
- run: yarn upgrade --latest && yarn build | |
working-directory: website | |
# See: https://github.com/peter-evans/create-pull-request/tree/master#reference-example | |
- name: create PR | |
id: create_pull_request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
# See: https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
# See: https://github.com/peter-evans/create-pull-request/issues/48#issuecomment-537478081 | |
token: ${{ secrets.PAT }} | |
# See: https://github.com/peter-evans/create-pull-request/issues/593 | |
committer: GitHub <noreply@github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
commit-message: '`yarn upgrade --latest && yarn build`' | |
title: '`yarn upgrade --latest && yarn build`' | |
body: | | |
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) | |
--- | |
See: https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs | |
branch: upgrade_website_dependencies | |
delete-branch: true | |
labels: dependencies | |
- name: enable auto-merge | |
if: ${{ steps.create_pull_request.outputs.pull-request-number != '' }} | |
run: gh pr merge ${{ steps.create_pull_request.outputs.pull-request-number }} --squash --auto | |
env: | |
GH_TOKEN: ${{ secrets.PAT }} |