diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0b6528a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,51 @@ +name: Build and Deploy + +on: + push: + branches: + - source + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3 + + - name: Install dependencies + run: bundle install + + - name: Clone target repository + run: | + git clone --quiet https://github.com/ginzarb/ginzarb.github.io.git build + pushd build + git checkout -b master + popd + + - name: Build with Middleman + run: bundle exec middleman build + + - name: create token + id: create_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Deploy + if: github.ref == 'refs/heads/source' + run: | + cd build + git add -A + git commit -m 'Reflect changed sources' + git push -f --quiet https://${{ steps.create_token.outputs.token }}@github.com/ginzarb/ginzarb.github.io.git master 2> /dev/null + env: + GIT_COMMITTER_NAME: willnet + GIT_COMMITTER_EMAIL: netwillnet@gmail.com + GIT_AUTHOR_NAME: willnet + GIT_AUTHOR_EMAIL: netwillnet@gmail.com \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 385d82c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: ruby -script: bundle exec middleman build - -env: - global: - - GIT_COMMITTER_NAME=willnet - - GIT_COMMITTER_EMAIL=netwillnet@gmail.com - - GIT_AUTHOR_NAME=willnet - - GIT_AUTHOR_EMAIL=netwillnet@gmail.com - - secure: "QNZtTUtaOy00i8hH41wmfnzvTgA+219Ny1VMNDlVdSuOidxEyikUA+c+qz0urzTZqaLpcC6SUGQ6zH7bD2SemvzWUA/B32FaKF46k7scHzIx+vcoAbigDxrglLKda3ksLOt/vtlR0NpWasocPY4ohmPkJGwgy6uFQbTE/ZPsIEw=" - -before_script: - - git clone --quiet https://github.com/ginzarb/ginzarb.github.io.git build - - pushd build - - git checkout -b master - - popd - -after_success: - - cd build - - git add -A - - git commit -m 'Reflect changed sources' - - '[ "$TRAVIS_BRANCH" == "source" ] && [ $GH_TOKEN ] && git push -f --quiet https://$GH_TOKEN@github.com/ginzarb/ginzarb.github.io.git master 2> /dev/null' diff --git a/Gemfile b/Gemfile index 81ac493..8278d16 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,4 @@ # the following line to use "https" source 'http://rubygems.org' -gem "middleman", "~>3.0.14" -gem "middleman-deploy", "~> 0.0.12" - +gem "middleman" diff --git a/Gemfile.lock b/Gemfile.lock index 6d18406..7867dbe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,109 +1,109 @@ GEM remote: http://rubygems.org/ specs: - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - chunky_png (1.2.8) - coffee-script (2.2.0) + activesupport (7.0.8.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + backports (3.25.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.3.3) - compass (0.12.2) - chunky_png (~> 1.2) - fssm (>= 0.2.7) - sass (~> 3.1) - execjs (1.4.0) - multi_json (~> 1.0) - fssm (0.2.10) - haml (4.0.2) + coffee-script-source (1.12.2) + concurrent-ruby (1.3.3) + contracts (0.16.1) + dotenv (3.1.2) + erubis (2.7.0) + execjs (2.9.1) + fast_blank (1.0.1) + fastimage (2.3.1) + ffi (1.17.0) + haml (6.3.0) + temple (>= 0.8.2) + thor tilt - hike (1.2.2) - http_router (0.10.2) - rack (>= 1.0.0) - url_mount (~> 0.2.1) - i18n (0.6.1) - listen (0.7.3) - maruku (0.6.1) - syntax (>= 1.0.0) - middleman (3.0.14) - middleman-core (= 3.0.14) - middleman-more (= 3.0.14) - middleman-sprockets (~> 3.1.0) - middleman-core (3.0.14) - activesupport (~> 3.2.6) - bundler (~> 1.1) - listen (~> 0.7.3) - rack (~> 1.4.1) - rack-test (~> 0.6.1) - rb-fsevent (~> 0.9.3) - thor (~> 0.15.4) - tilt (~> 1.3.6) - middleman-deploy (0.0.12) - middleman-core (>= 3.0.0) - ptools - middleman-more (3.0.14) - coffee-script (~> 2.2.0) - coffee-script-source (~> 1.3.3) - compass (>= 0.12.2) - execjs (~> 1.4.0) - haml (>= 3.1.6) - i18n (~> 0.6.0, < 0.6.2) - maruku (~> 0.6.0) - middleman-core (= 3.0.14) - padrino-helpers (= 0.10.7) - sass (>= 3.1.20) - uglifier (~> 1.2.6) - middleman-sprockets (3.1.1) - middleman-core (>= 3.0.14) - padrino-helpers (= 0.10.7) - sprockets (~> 2.1) - sprockets-helpers (~> 1.0.0) - sprockets-sass (~> 1.0.0) - multi_json (1.7.3) - padrino-core (0.10.7) - activesupport (~> 3.2.0) - http_router (~> 0.10.2) - sinatra (~> 1.3.1) - thor (~> 0.15.2) - tilt (~> 1.3.0) - padrino-helpers (0.10.7) - i18n (~> 0.6) - padrino-core (= 0.10.7) - ptools (1.2.2) - rack (1.4.5) - rack-protection (1.5.0) - rack - rack-test (0.6.2) - rack (>= 1.0) - rb-fsevent (0.9.3) - sass (3.2.9) - sinatra (1.3.6) - rack (~> 1.4) - rack-protection (~> 1.3) - tilt (~> 1.3, >= 1.3.3) - sprockets (2.9.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-helpers (1.0.1) - sprockets (~> 2.0) - sprockets-sass (1.0.1) - sprockets (~> 2.0) - tilt (~> 1.1) - syntax (1.0.0) - thor (0.15.4) - tilt (1.3.7) - uglifier (1.2.7) - execjs (>= 0.3.0) - multi_json (~> 1.3) - url_mount (0.2.1) - rack + hamster (3.0.0) + concurrent-ruby (~> 1.0) + hashie (3.6.0) + i18n (1.6.0) + concurrent-ruby (~> 1.0) + kramdown (2.4.0) + rexml + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + memoist (0.16.2) + middleman (4.5.1) + coffee-script (~> 2.2) + haml (>= 4.0.5) + kramdown (>= 2.3.0) + middleman-cli (= 4.5.1) + middleman-core (= 4.5.1) + middleman-cli (4.5.1) + thor (>= 0.17.0, < 1.3.0) + middleman-core (4.5.1) + activesupport (>= 6.1, < 7.1) + addressable (~> 2.4) + backports (~> 3.6) + bundler (~> 2.0) + contracts (~> 0.13, < 0.17) + dotenv + erubis + execjs (~> 2.0) + fast_blank + fastimage (~> 2.0) + hamster (~> 3.0) + hashie (~> 3.4) + i18n (~> 1.6.0) + listen (~> 3.0) + memoist (~> 0.14) + padrino-helpers (~> 0.15.0) + parallel + rack (>= 1.4.5, < 3) + sassc (~> 2.0) + servolux + tilt (~> 2.0.9) + toml + uglifier (~> 3.0) + webrick + minitest (5.24.0) + padrino-helpers (0.15.3) + i18n (>= 0.6.7, < 2) + padrino-support (= 0.15.3) + tilt (>= 1.4.1, < 3) + padrino-support (0.15.3) + parallel (1.25.1) + parslet (2.0.0) + public_suffix (6.0.0) + rack (2.2.9) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + rexml (3.3.1) + strscan + sassc (2.4.0) + ffi (~> 1.9) + servolux (0.13.0) + strscan (3.1.0) + temple (0.10.3) + thor (1.2.2) + tilt (2.0.11) + toml (0.3.0) + parslet (>= 1.8.0, < 3.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + webrick (1.8.1) PLATFORMS ruby DEPENDENCIES - middleman (~> 3.0.14) - middleman-deploy (~> 0.0.12) + middleman + +BUNDLED WITH + 2.5.11 diff --git a/config.rb b/config.rb index ba6c568..bd52406 100644 --- a/config.rb +++ b/config.rb @@ -75,10 +75,3 @@ # Or use a different image path # set :http_path, "/Content/images/" end - -activate :deploy do |deploy| - deploy.method = :git - deploy.branch = 'master' -end - - diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb index 7b3c0df..54522e3 100644 --- a/source/layouts/layout.erb +++ b/source/layouts/layout.erb @@ -7,7 +7,7 @@ - <%= data.page.title || "ginzarb" %> + ginza.rb