Skip to content

TTSVibeLounge

TTSVibeLounge #2948

Workflow file for this run

name: TTSVibeLounge
on:
schedule:
- cron: '0 */6 * * *'
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container: alexlaverty/ttsvibelounge:1.0.8
steps:
# # Git version in container must match git version on ubuntu server
# - name: get git
# run: |
# apt update -y
# apt install -y libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc
# wget https://github.com/git/git/archive/refs/tags/v2.38.1.tar.gz
# tar -xvf v2.38.1.tar.gz
# cd git-2.38.1
# make prefix=/usr/local all
# make prefix=/usr/local install
# git --version
# gh secret set CREDENTIALS_STORAGE_REFRESH < credentials.storage
- name: checkout repo content
uses: actions/checkout@v3
- name: Run ttsvibelounge Script
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CREDENTIALS_STORAGE: ${{ secrets.CREDENTIALS_STORAGE }}
PRAW_CLIENT_ID: ${{ secrets.PRAW_CLIENT_ID }}
PRAW_CLIENT_SECRET: ${{ secrets.PRAW_CLIENT_SECRET }}
PRAW_USER_AGENT: ${{ secrets.PRAW_USER_AGENT }}
PRAW_USERNAME: ${{ secrets.PRAW_USERNAME }}
PRAW_PASSWORD: ${{ secrets.PRAW_PASSWORD }}
RUMBLE_PASSWORD: ${{ secrets.RUMBLE_PASSWORD }}
RUMBLE_USERNAME: ${{ secrets.RUMBLE_USERNAME }}
YOUTUBE_CLIENT_SECRET: ${{ secrets.YOUTUBE_CLIENT_SECRET }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
echo $PWD
echo ${{ github.workspace }}
echo $GITHUB_WORKSPACE
echo $YOUTUBE_CLIENT_SECRET > client_secret.json
echo $CREDENTIALS_STORAGE > credentials.storage
cp config/auth-env.py config/auth.py
playwright install
python3 app.py --total-posts 1 \
--enable-upload \
--enable-background \
--background-directory /app/assets/backgrounds
python3 refresh_token.py
rm -f client_secret.json
rm -f credentials.storage
- name: check for changes
run: |
git config --global --add safe.directory $(realpath .)
if git diff --exit-code data.csv; then
echo changes_exist=false
echo "changes_exist=false" >> $GITHUB_ENV
else
echo changes_exist=true
echo "changes_exist=true" >> $GITHUB_ENV
fi
- name: Push updates
if: env.changes_exist == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add data.csv
git commit -m "TTSVibeLounge Scheduled Update" -a
git push -f