diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5b1b96c..013bfcb 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -36,52 +36,38 @@ jobs: ${{ runner.os }}-pip- # Cache cookie.json - - name: Cache app/temp/auth + - name: Cache cookie.json uses: actions/cache@v3 with: - path: /home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth + path: /home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth/cookies.json key: ${{ runner.os }}-cookie-${{ hashFiles('/home/runner/work/today.isangjeong/today.isangjeong/app/temp/auth/cookies.json') }} - restore-keys: | - ${{ runner.os }}-cookie- - - name: Install dependencies + - name: Install dependencies (only if requirements.txt changed) run: | - pwd python -m pip install --upgrade pip - if [ -f requirements.txt ] && ! pip freeze | diff - requirements.txt > /dev/null; then - pip install -r requirements.txt - else - echo "No changes in requirements.txt, skipping installation" - fi + pip install -r requirements.txt || echo "No changes in requirements.txt, skipping installation" - - name: Set Permission + - name: Set Permissions run: | - cd app - chmod +x run.sh - chmod +x gen-config.sh + chmod +x app/run.sh app/gen-config.sh - name: Generate Config run: | cd app - pwd - ls -al ./gen-config.sh - cat config.json - name: Add SSH private key run: | mkdir -p ~/.ssh echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - + - name: Start SOCKS proxy with SSH run: | ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -D 9999 -f -N imnyang@imnya.ng -p5322 echo "SOCKS proxy started" - - name: Run + - name: Run application run: | cd app - pwd - ls -al ./run.sh