Skip to content

Commit

Permalink
Update staging.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanky-23 authored Aug 23, 2024
1 parent 8bfac95 commit 7953e59
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: bp_runner
defaults:
run:
working-directory: /var/www/aihomework/boilerplate/staging
working-directory: /var/www/aihomework/boilerplate

steps:
- name: Checkout code
Expand All @@ -28,22 +28,23 @@ jobs:
run: |
git remote rm action
- name: Stash or remove local changes
run: |
if git diff --quiet; then
echo "No local changes to stash."
else
echo "Stashing local changes..."
git stash --include-untracked || echo "Failed to stash changes. Attempting to reset..."
git reset --hard || exit 1
fi
# - name: Stash or remove local changes
# run: |
# if git diff --quiet; then
# echo "No local changes to stash."
# else
# echo "Stashing local changes..."
# git stash --include-untracked || echo "Failed to stash changes. Attempting to reset..."
# git reset --hard || exit 1
# fi

- name: Pull from GitHub
id: pull
run: |
remote_repo="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git remote add action $remote_repo
git pull $remote_repo staging
# git remote add action $remote_repo
# git pull $remote_repo staging
git clone $remote_repo staging
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down

0 comments on commit 7953e59

Please sign in to comment.