a
This commit is contained in:
@@ -22,6 +22,7 @@ jobs:
|
|||||||
VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
|
VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
|
||||||
ENV_FILE: ${{ secrets.ENV_FILE }}
|
ENV_FILE: ${{ secrets.ENV_FILE }}
|
||||||
REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git
|
REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
# 1. Setup SSH Key
|
# 1. Setup SSH Key
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
@@ -37,6 +38,9 @@ jobs:
|
|||||||
# Configure git safe directory
|
# Configure git safe directory
|
||||||
git config --global --add safe.directory \$APP_DIR
|
git config --global --add safe.directory \$APP_DIR
|
||||||
|
|
||||||
|
# Configure git to use token for authentication
|
||||||
|
git config --global url.\"https://x-access-token:$GITHUB_TOKEN@github.com/\".insteadOf \"https://github.com/\"
|
||||||
|
|
||||||
# Clone or update repository
|
# Clone or update repository
|
||||||
if [ -d \"\$APP_DIR/.git\" ]; then
|
if [ -d \"\$APP_DIR/.git\" ]; then
|
||||||
echo 'Repository exists, pulling latest changes...'
|
echo 'Repository exists, pulling latest changes...'
|
||||||
|
|||||||
Reference in New Issue
Block a user