-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.16 KB
/
jekyll.yaml
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
35
36
37
38
39
40
41
42
43
44
45
name: Website
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Build the site using the Makefile
run: cd ${{ github.workspace }} && chmod 777 . && make
- uses: actions/upload-artifact@v2
with:
name: site
path: '_site/*'
commit:
runs-on: ubuntu-latest
needs: [ build ]
if: github.event_name == 'push' && github.repository == 'dmcpatrimonio/ensenanza-cambio-climatico'
env:
commit_message: ${{ github.event.head_commit.message }}
steps:
- uses: actions/checkout@v2
with:
ref : 'gh-pages'
- name: Download site
uses: actions/download-artifact@v2
with:
name: site
path: ${{ github.workspace }}/
- name: Commit changes to gh-pages branch
run: |
cd ${{ github.workspace }}
git config --local user.email "runner@github.com"
git config --local user.name "Automated build"
git add .
git commit -m "${{ env.commit_message }}" -a || git status
git pull --ff-only
git push