Update python-app.yml
This commit is contained in:
parent
8b4e0de501
commit
a75201526e
1 changed files with 8 additions and 22 deletions
30
.github/workflows/python-app.yml
vendored
30
.github/workflows/python-app.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue