5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 03:16:21 +00:00
panel/.gitlab-ci.yml

34 lines
1.2 KiB
YAML
Raw Normal View History

2023-04-15 15:23:43 +00:00
image: "gitea.nulo.in/sutty/panel:3.14.10-2.7.8-panel.sutty.nl"
variables:
RAILS_ENV: "production"
LC_ALL: "C.UTF-8"
cache:
paths:
- "vendor/ruby"
assets:
2023-04-15 15:31:52 +00:00
stage: "build"
2023-04-15 15:23:43 +00:00
rules:
2023-04-15 15:31:12 +00:00
- if: "$CI_COMMIT_BRANCH == \"panel.sutty.nl\""
2023-04-15 15:23:43 +00:00
- if: "$CI_COMMIT_BRANCH"
changes:
2023-04-15 15:28:37 +00:00
compare_to: "refs/heads/rails"
2023-04-15 15:23:43 +00:00
paths:
- "package.json"
- "app/javascript/**/*"
- "app/assets/**/*"
before_script:
- "git config --global user.email \"${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}\""
- "git config --global user.name \"${GIT_USER_NAME:-$GITLAB_USER_NAME}\""
- "git remote set-url --push origin \"https://${GITLAB_USERNAME}:${GITLAB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git\""
- "apk add python2 dotenv brotli"
- "mv config/credentials.yml.enc.ci config/credentials.yml.enc"
- "cp .env.example .env"
- "dotenv bundle install --path=vendor"
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"
after_script:
- "git add public && git commit -m \"ci: assets [skip ci]\""
- "git push -o ci.skip"