-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1007 Bytes
/
github-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Compile HTML and Deploy to GitHub Pages
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.1
bundler-cache: true
- name: Compile HTML
run: bundle exec jekyll build
shell: bash
- name: Deploy to GitHub Pages
run: |
cd _site
touch .nojekyll
git config --global init.defaultBranch main
git config --global user.name "vivarium-collective"
git config --global user.email "vivarium-collective@users.noreply.github.com"
git init
git add -A
git commit -m "Jekyll build from commit $GITHUB_SHA by GitHub Action"
git push -f "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" main:gh-pages