File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments