Skip to content

Commit c96d62f

Browse files
committed
chore: update ignore files and CI workflows for better configuration management
- Modified `.dockerignore` and `.gitignore` to ensure local environment files (`.env`) are properly ignored across all directories. - Updated CI workflows in `ci_deploy_pr_branch.yml`, `ci_tests.yml`, and `deploy.yml` to replace `git pull --ff-only` with `git checkout -B` for better handling of branch synchronization, avoiding issues with divergent local clones.
1 parent 22fa0a4 commit c96d62f

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ cmake-build-release
1717
# Misc
1818
**/.cache
1919
**/*.log
20-
.env
20+
**/.env
2121
deploy/.env

.github/workflows/ci_deploy_pr_branch.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,8 @@ jobs:
188188
cd /opt/vox-server
189189
_d "repo root $(pwd)"
190190
git fetch origin "${BRANCH}"
191-
git checkout "${BRANCH}"
192-
git pull --ff-only origin "${BRANCH}"
193-
_d "--- after git pull ---"
191+
git checkout -B "${BRANCH}" "origin/${BRANCH}"
192+
_d "--- after git sync ---"
194193
git rev-parse HEAD && git status -sb || true
195194
if [ ! -d deploy ]; then
196195
_d "ERROR: $(pwd)/deploy is not a directory"; exit 1

.github/workflows/ci_tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,8 @@ jobs:
150150
cd /opt/vox-server
151151
_d "repo root $(pwd)"
152152
git fetch origin "${BRANCH}"
153-
git checkout "${BRANCH}"
154-
git pull --ff-only origin "${BRANCH}"
155-
_d "--- after git pull ---"
153+
git checkout -B "${BRANCH}" "origin/${BRANCH}"
154+
_d "--- after git sync ---"
156155
git rev-parse HEAD && git status -sb || true
157156
if [ ! -d deploy ]; then
158157
_d "ERROR: $(pwd)/deploy is not a directory"; exit 1

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ jobs:
6161
_d "IMAGE=${IMAGE} branch=${{ github.event.inputs.branch }} deploy_path=${{ github.event.inputs.deploy_path }}"
6262
cd "${{ github.event.inputs.deploy_path }}"
6363
_d "repo root $(pwd)"
64+
# Match remote tip (avoids failed ff-only pulls after branch switches / divergent local clones)
6465
git fetch origin "${{ github.event.inputs.branch }}"
65-
git checkout "${{ github.event.inputs.branch }}"
66-
git pull --ff-only origin "${{ github.event.inputs.branch }}"
67-
_d "--- after git pull ---"
66+
git checkout -B "${{ github.event.inputs.branch }}" "origin/${{ github.event.inputs.branch }}"
67+
_d "--- after git sync ---"
6868
git rev-parse HEAD && git status -sb || true
6969
if [ ! -d deploy ]; then
7070
_d "ERROR: $(pwd)/deploy is not a directory"; exit 1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ build/
1818
CMakePresets.json
1919
compile_commands.json
2020

21+
# Local config files
22+
**/.env
23+
deploy/nginx/conf.d/20-ssl.conf
24+
2125
# mpeltonen/sbt-idea plugin
2226
**.idea_modules/
2327

0 commit comments

Comments
 (0)