From ffbac01086147ecc3e82589e137ac3990af1a678 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 12:39:26 -0300 Subject: [PATCH] ci: arreglos de git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * correr yarn para actualizar el yarn.lock si quedó mal * commitear yarn.lock * no commitear si falla la compilación --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8994356..ee5d6413 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,10 +24,12 @@ assets: - "mv config/credentials.yml.enc.ci config/credentials.yml.enc" - "cp .env.example .env" - "dotenv bundle install --path=vendor" + - "yarn" script: - "dotenv RAILS_ENV=production bundle exec rails webpacker:clobber" - "dotenv RAILS_ENV=production bundle exec rails assets:precompile" - "dotenv RAILS_ENV=production bundle exec rails assets:clean" + - "git checkout -B ${CI_COMMIT_BRANCH}" + - "git add yarn.lock public && git commit -m \"ci: assets [skip ci]\"" after_script: - - "git add public && git commit -m \"ci: assets [skip ci]\"" - "git push -o ci.skip"