Skip to content

Merge branch 'main' of github.com:yunnysunny/hotel-tvn #23

Merge branch 'main' of github.com:yunnysunny/hotel-tvn

Merge branch 'main' of github.com:yunnysunny/hotel-tvn #23

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
schedule:
- cron: '0 0 * * *' # 每天执行一次(UTC 0:00)
env:
USE_LOCAL_URLS: true
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- node-version: 22.x
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# 在 pull_request 事件中,需要此行来检出头部的分支
ref: ${{ github.head_ref }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false
- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: |
pnpm install
pnpm exec playwright install
- name: Build
run: |
pnpm start
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
# 提交信息
commit_message: "chore: update live files [skip ci]"
# 可选: 指定要添加的文件模式,默认是所有更改的文件
file_pattern: '*.txt *.m3u'
# 可选: 自定义提交用户的名称和邮箱
commit_user_name: "github-actions[bot]"
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"