clean de l'install
This commit is contained in:
parent
9a3c55a5a8
commit
3cc656ee82
1 changed files with 7 additions and 5 deletions
12
.github/workflows/deploy.yml
vendored
12
.github/workflows/deploy.yml
vendored
|
|
@ -12,26 +12,28 @@ jobs:
|
||||||
id: set-path
|
id: set-path
|
||||||
run: |
|
run: |
|
||||||
if [ "${GITHUB_REF_NAME}" = "main" ]; then
|
if [ "${GITHUB_REF_NAME}" = "main" ]; then
|
||||||
echo "DEPLOY_PATH=/share/discord-bot-prod" >> $GITHUB_ENV
|
echo "DEPLOY_PATH=/share/CACHEDEV1_DATA/discord-bot-prod" >> $GITHUB_ENV
|
||||||
elif [ "${GITHUB_REF_NAME}" = "dev" ]; then
|
elif [ "${GITHUB_REF_NAME}" = "dev" ]; then
|
||||||
echo "DEPLOY_PATH=/share/discord-bot-dev" >> $GITHUB_ENV
|
echo "DEPLOY_PATH=/share/CACHEDEV1_DATA/discord-bot-dev" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "Unsupported branch"
|
echo "Unsupported branch"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Update bot files
|
- name: Update bot files
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git config --global --add safe.directory $DEPLOY_PATH
|
|
||||||
cd $DEPLOY_PATH
|
cd $DEPLOY_PATH
|
||||||
|
git config --global --add safe.directory $DEPLOY_PATH
|
||||||
|
|
||||||
if [ ! -d ".git" ]; then
|
if [ ! -d ".git" ]; then
|
||||||
git init
|
git init
|
||||||
|
git remote add origin https://x-access-token:$GITHUB_TOKEN@github.com/ArcElewyn/Discord.git
|
||||||
else
|
else
|
||||||
git remote remove origin || true
|
git remote remove origin || true
|
||||||
|
git remote add origin https://x-access-token:$GITHUB_TOKEN@github.com/ArcElewyn/Discord.git
|
||||||
fi
|
fi
|
||||||
git remote add origin https://x-access-token:$GITHUB_TOKEN@github.com/ArcElewyn/Discord.git
|
|
||||||
git fetch origin $GITHUB_REF_NAME
|
git fetch origin $GITHUB_REF_NAME
|
||||||
git reset --hard origin/$GITHUB_REF_NAME
|
git reset --hard origin/$GITHUB_REF_NAME
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue