Skip to content

Commit

Permalink
Fix scripts for local deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Oct 12, 2024
1 parent ab4f329 commit 4d2107e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ task :build do |t, args|
cmd << '--trace'
cmd << '--lsi' if ENV['LSI']
cmd << '--watch' if args.extras.include? 'watch'
cmd.concat(%w[--config _config.yml,_local.yml]) if File.file? '_local.yml'
unless ENV['JEKYLL_ENV'] == 'production'
cmd.concat(%w[--config _config.yml,_local.yml]) if File.file? '_local.yml'
end
begin
sh(*cmd)
rescue Interrupt
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ exclude:
- .github/
- .gitignore
- .jekyll-assets-cache
- .ruby-lsp/
- .sass-cache
- .travis.yml
- .vscode
Expand Down
7 changes: 4 additions & 3 deletions script/deploy-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ source_msg="$(git log -1 --pretty="[%h] %B")"

pushd "$SRC" &>/dev/null
e_info "Adding commit info"
git config user.name "${GIT_USER:-GitHub}"
git config user.email "${GIT_EMAIL:-noreply@github.com}"
git add --all
git commit --quiet --message "${COMMIT_MSG}" --message "$source_msg"
git \
-c user.name "${GIT_USER:-GitHub}" \
-c user.email "${GIT_EMAIL:-noreply@github.com}" \
commit --quiet --message "${COMMIT_MSG}" --message "$source_msg"

e_info "Pushing to GitHub"
SSH_AUTH_SOCK=none \
Expand Down
2 changes: 1 addition & 1 deletion script/generate-cname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'yaml'

yaml_file = ARGV[0] || '_config.yml'
output_dir = ARGV[1] || '_site'
output_dir = ARGV[1] || ENV['SRC'] || '_site'

config = YAML.load_file yaml_file, aliases: true
File.open "#{output_dir}/CNAME", 'w' do |f|
Expand Down
2 changes: 1 addition & 1 deletion script/generate-redirects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
yaml_file = ARGV[0] || '_config.yml'
config = YAML.load_file yaml_file, aliases: true
site_url = config['url'] || ''
site_dir = ARGV[1] || config['destination'] || '_site'
site_dir = ARGV[1] || ENV['SRC'] || config['destination'] || '_site'
style = ENV['STYLE'] || 'cloudflare'

rcode = case style
Expand Down

0 comments on commit 4d2107e

Please sign in to comment.