-
Notifications
You must be signed in to change notification settings - Fork 131
52 lines (46 loc) · 1.59 KB
/
upload_episode.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
name: Upload Episode To Anchor Fm
on:
workflow_dispatch:
push:
branches: [master]
paths:
- "blablas/**"
- "scripts/**"
jobs:
upload_episode:
timeout-minutes: 12
runs-on: ubuntu-latest
defaults:
run:
working-directory: scripts
steps:
- name: 📦 Checkout project repo
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
cache: "yarn"
- name: 📦 Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: 📦 Restore Project Dependencies (node_modules)
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/scripts/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Install And Configure youtube-dl
- name: Install And Configure youtube-dl
run: |
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux -O /usr/local/bin/yt-dlp_linux
sudo chmod a+rx /usr/local/bin/yt-dlp_linux
sudo ln -s /usr/local/bin/yt-dlp_linux /usr/local/bin/yt-dlp
- name: Install Deps
run: yarn install --immutable
- name: Generate Podcast Files and Upload Episode To Anchor Using Puppeteer
env: # Or as an environment variable
ANCHOR_EMAIL: ${{ secrets.ANCHOR_EMAIL }}
ANCHOR_PASSWORD: ${{ secrets.ANCHOR_PASSWORD }}
run: yarn upload-to-anchor