forked from wbt5/real-url
-
Notifications
You must be signed in to change notification settings - Fork 42
96 lines (77 loc) · 2.67 KB
/
update-room-url.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This is a basic workflow to help you get started with Actions
name: update-room-url
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
#push:
# branches: [ master ]
#schedule:
#- cron: '0 12 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
node-version: [ 16.x ]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
#cache: 'npm'
- name: setup and install python packages
run: |
pip install -r requirements.txt
- name: install pnpm
run: npm i pnpm -g
- name: install nodejs dependences
working-directory: ./nodejs
run: |
pnpm i --no-frozen-lockfile
- name: update bilibili
working-directory: ./nodejs
run: node bilibili-batch.js
- name: update douyu
working-directory: ./nodejs
run: node douyu-batch.js
#- name: update huya
# working-directory: ./nodejs
# run: node huya-batch.js
- name: merge m3u files
working-directory: ./nodejs
run: node all-m3u.js
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: m3u data
path: |
data
- name: pubish release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "data/**"
env:
GITHUB_TOKEN: ${{ secrets.GIT_PAT_TOKEN }}
- name: Deploy to Vercel
run: npx vercel --token ${VERCEL_TOKEN} --prod
working-directory: ./data
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}