Skip to content

Merge pull request #50 from ginzarb/fix-deploy-last-second #11

Merge pull request #50 from ginzarb/fix-deploy-last-second

Merge pull request #50 from ginzarb/fix-deploy-last-second #11

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- source
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
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: Deploy
if: github.ref == 'refs/heads/source'
run: |
cd build
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m 'Reflect changed sources'
git push