Skip to content

Commit

Permalink
Update prod.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bankolejohn authored Aug 23, 2024
1 parent 3b5f2c6 commit 70cf235
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: bp_runner
defaults:
run:
working-directory: /var/www/aihomework/boilerplate/prod
working-directory: /var/www/aihomework/boilerplate/

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

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 prod
git clone $remote_repo prod
# git remote add action $remote_repo
# git pull $remote_repo prod
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down

0 comments on commit 70cf235

Please sign in to comment.