updating yt play feature #68
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: CI/CD | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
# CI: | |
# runs-on: ubuntu-latest | |
# environment: prod | |
# | |
# steps: | |
# - uses: actions/checkout@v4 | |
# | |
# - name: Set up JDK 21 | |
# uses: actions/setup-java@v4.2.2 | |
# with: | |
# distribution: 'temurin' | |
# java-version: '21' | |
# cache: maven | |
# | |
# - name: Run the Maven test | |
# run: mvn test | |
CD: | |
# needs: [CI] | |
runs-on: self-hosted | |
environment: prod | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} | |
SPOTIFY_SECRET: ${{ secrets.SPOTIFY_SECRET }} | |
YT_TOKEN: ${{ secrets.YT_VISITOR }} | |
YT_VISITOR: ${{ secrets.YT_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Build New Image | |
run: docker compose -f docker-compose.yml build | |
- name: Update Lil Mo | |
run: | | |
docker compose -f docker-compose.yml stop lil-mo && | |
docker compose -f docker-compose.yml rm -f lil-mo && | |
docker compose -f docker-compose.yml up -d | |
- name: Cleaning up | |
run: | | |
docker image prune -f |