Skip to content

Commit 8ab9990

Browse files
committed
chore: env
1 parent 371f473 commit 8ab9990

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,35 @@ jobs:
5353
key: ${{ secrets.KEY }}
5454
port: ${{ secrets.PORT }}
5555
script: |
56+
echo "Deploy path: ${{ secrets.DEPLOY_PATH }}"
57+
if [ ! -d "${{ secrets.DEPLOY_PATH }}" ]; then
58+
echo "ERROR: Directory ${{ secrets.DEPLOY_PATH }} does not exist"
59+
exit 1
60+
fi
61+
5662
cd ${{ secrets.DEPLOY_PATH }}
63+
echo "Creating .env file in $(pwd)..."
5764
echo "WIKI_BOT_USERNAME=${{ secrets.WIKI_BOT_USERNAME }}" > .env
5865
echo "WIKI_BOT_PASSWORD=${{ secrets.WIKI_BOT_PASSWORD }}" >> .env
66+
echo ".env file created with content:"
67+
cat .env
68+
echo "Listing directory:"
69+
ls -la
70+
71+
- name: Verify .env existence
72+
uses: appleboy/ssh-action@v1.2.2
73+
with:
74+
host: ${{ secrets.HOST }}
75+
username: ${{ secrets.USER }}
76+
key: ${{ secrets.KEY }}
77+
port: ${{ secrets.PORT }}
78+
script: |
79+
if [ -f "${{ secrets.DEPLOY_PATH }}/.env" ]; then
80+
echo ".env exists at ${{ secrets.DEPLOY_PATH }}"
81+
else
82+
echo "ERROR: .env file was not found!"
83+
exit 1
84+
fi
5985
6086
- name: Install dependencies on server
6187
uses: appleboy/ssh-action@v1.2.2

0 commit comments

Comments
 (0)