ci: 💚 Create master.key, Dockerfile precompile assets, uglifier harmony true
This commit is contained in:
@@ -9,6 +9,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@master
|
||||
- name: Create master.key
|
||||
uses: "finnp/create-file-action@master"
|
||||
env:
|
||||
FILE_NAME: "config/master.key"
|
||||
FILE_DATA: ${{ secrets.SECRET_KEY_BASE }}
|
||||
- name: Login to Heroku
|
||||
run: heroku container:login
|
||||
env:
|
||||
|
||||
+13
-3
@@ -23,14 +23,24 @@ yarn
|
||||
COPY ./entrypoint.sh /usr/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/bin/entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
|
||||
RUN gem install bundler --version "$BUNDLE_VERSION"
|
||||
|
||||
COPY . .
|
||||
COPY ./Gemfile .
|
||||
COPY ./Gemfile.lock .
|
||||
|
||||
RUN bundle install --jobs 20 --retry 5
|
||||
|
||||
COPY ./package.json .
|
||||
COPY ./yarn.lock .
|
||||
|
||||
RUN yarn
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
COPY . .
|
||||
|
||||
CMD ["rails", "s", "-b", "0.0.0.0"]
|
||||
RUN chmod 600 config/master.key
|
||||
|
||||
RUN bundle exec rails assets:precompile
|
||||
|
||||
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
|
||||
@@ -25,7 +25,7 @@ Rails.application.configure do
|
||||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||
|
||||
# Compress JavaScripts and CSS.
|
||||
config.assets.js_compressor = :uglifier
|
||||
config.assets.js_compressor = Uglifier.new(harmony: true)
|
||||
# config.assets.css_compressor = :sass
|
||||
|
||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||
|
||||
Reference in New Issue
Block a user