Skip to content

add ep 199 AMA

add ep 199 AMA #314

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