-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (56 loc) · 1.75 KB
/
kara.yaml
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
name: Karaoke CI + CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update
- name: Install fuse
run: sudo apt-get install -y fuse3
- name: Install rclone
run: curl https://rclone.org/install.sh | sudo bash
- name: Configure rclone
env:
RCLONE_CONF: ${{ secrets.RCLONE_CONF_FILE }}
run: |
mkdir -p ~/.config/rclone
echo "$RCLONE_CONF" > ~/.config/rclone/rclone.conf
- name: Mount medias
run: |
mkdir ./medias
rclone mount kara0-wpi-moe:downloads/medias ./medias --daemon
# - name: Download medias
# run: rclone sync kara0-wpi-moe:downloads/medias ./medias
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Setup cache for ffmpeg-static
run: mkdir ~/.cache/
- run: npx github:weeb-poly/kara-tools
- name: Unmount medias
run: fusermount -u ./medias
deploy:
needs: [ test ]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rclone
run: curl https://rclone.org/install.sh | sudo bash
- name: Configure rclone
env:
RCLONE_CONF: ${{ secrets.RCLONE_CONF_FILE }}
run: |
mkdir -p ~/.config/rclone
echo "$RCLONE_CONF" > ~/.config/rclone/rclone.conf
- name: Deploy repo
run: |
rclone sync karaokes kara0-wpi-moe:downloads/karaokes
rclone sync lyrics kara0-wpi-moe:downloads/lyrics
rclone sync tags kara0-wpi-moe:downloads/tags