-
Notifications
You must be signed in to change notification settings - Fork 329
44 lines (38 loc) · 1.01 KB
/
build.yml
File metadata and controls
44 lines (38 loc) · 1.01 KB
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
name: Build docs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
container:
image: danog/gojekyll
steps:
- name: Setup
run: apt-get update && apt-get install -y git openssh-client
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
fetch-depth: 0
- name: Build
run: |
set -ex
git config --global user.email "daniil@daniil.it"
git config --global user.name "Daniil Gentili"
git config --global --add safe.directory $PWD
cd docs
gojekyll build
rm -rf /tmp/_site
cp -a _site /tmp/
cd ..
git branch -D gh-pages || true
git switch --orphan gh-pages
cp -a /tmp/_site/* .
git add -A
git commit -am 'Update' >/dev/null
git push -f origin gh-pages