name: My blog's CI

on:
  push:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build the site in the jekyll/builder container
      run: |
        docker run \
        -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
        jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
    - name: Assign CNAME.
      run: echo emcorrales.com > _site/CNAME
    - name: Configuring Git...
      run: git config user.email contact@emcorrales.com && git config user.name "Emmanuel Corrales"
    - name: Configure repo.
      run: git add _site && git commit -m "Deploy!"
    - name: Splitting...
      run: git branch -D gh-pages && git subtree split -P _site -b gh-pages
    - name: Deploying...
      run: git push origin gh-pages --force

name: My blog's CI

on:
  push:
    branches:
    - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Build the site in the jekyll/builder container
      run: |
        docker run \
        -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
        jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
    - name: Assign CNAME.
      run: echo emcorrales.com > _site/CNAME
    - name: Configuring Git...
      run: git config user.email contact@emcorrales.com && git config user.name "Emmanuel Corrales"
    - name: Configure repo.
      run: git add _site && git commit -m "Deploy!"
    - name: Splitting...
      run: git subtree split -P _site -b gh-pages
    - name: Deploying...
      run: git push origin gh-pages --force

Remove command to delete gh-pages branch.
Remove command to delete gh-pages branch.
