Upload to TikTok inbox #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload to TikTok inbox | |
on: | |
workflow_dispatch: | |
schedule: | |
# Runs at 18:00 (6:00 PM) UTC every day | |
- cron: '0 18 * * *' | |
jobs: | |
post: | |
runs-on: ubuntu-latest | |
environment: | |
name: TikTok | |
url: https://www.tiktok.com/@holy.quran.clips | |
steps: | |
- uses: actions/checkout@master | |
- uses: pnpm/action-setup@v4 | |
- name: Install FFmpeg | |
run: sudo apt update && sudo apt install -y ffmpeg | |
- name: Use Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 20.x | |
- name: Install Dependencies and Linting | |
run: pnpm install && pnpm lint | |
- name: Initialize Chrome | |
run: pnpm remotion:chrome | |
- name: Render video.mp4 | |
env: | |
CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }} | |
RUN_COUNT: ${{ github.run_number }} | |
run: | | |
node remotion/generate-props.js | |
pnpm remotion:render --props="./input-props.json" | |
- name: Upload to TikTok | |
run: pnpm tsx scripts/upload-to-tiktok.ts | |
env: | |
TIKTOK_CLIENT_KEY: ${{ secrets.TIKTOK_CLIENT_KEY }} | |
TIKTOK_CLIENT_SECRET: ${{ secrets.TIKTOK_CLIENT_SECRET }} | |
TIKTOK_REFRESH_TOKEN: ${{ secrets.TIKTOK_REFRESH_TOKEN }} |