Skip to content

feat: Initial commit #156

feat: Initial commit

feat: Initial commit #156

name: Build and deploy
on:
push:
branches: main
repository_dispatch:
types: [jekyll-build]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
uses: docker://jekyll/jekyll
with:
entrypoint: bash
args: -c "/usr/local/bin/bundle install && /usr/local/bin/bundle exec jekyll build --incremental"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy
run: |
sudo chown -R $(whoami):$(whoami) .
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
cp -r _site /tmp
cd /tmp/_site
git init
git branch -M gh-pages
git add .
git commit -m "Deploy Jekyll to GitHub Pages"
git remote add origin "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
git push -f origin gh-pages