Update the build task

This commit is contained in:
Gabriel Arazas 2023-05-02 12:22:23 +08:00
parent 9dff125c76
commit 3c3bfa66f4
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -10,8 +10,8 @@ github_api_headers = {
} }
github_api_headers['Authorization'] = "Token #{ENV['GITHUB_API_BEARER_TOKEN']}" if ENV['GITHUB_API_BEARER_TOKEN'] github_api_headers['Authorization'] = "Token #{ENV['GITHUB_API_BEARER_TOKEN']}" if ENV['GITHUB_API_BEARER_TOKEN']
desc 'Build the site in Netlify with the given context' desc 'Build the site'
task :build, [:context, :base_url] => [:optimize_avatars] do |_, args| task :build, [:context, :base_url] => [:export_avatars] do |_, args|
args.with_defaults(context: 'production') args.with_defaults(context: 'production')
draft_args = '--environment development --buildDrafts --buildFuture --buildExpired' unless args.context == 'production' draft_args = '--environment development --buildDrafts --buildFuture --buildExpired' unless args.context == 'production'
base_uri_args = "-b #{args.base_url}" if args.base_url base_uri_args = "-b #{args.base_url}" if args.base_url