-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.24 KB
/
buildSite.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
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build site
on:
schedule:
- cron: '0 13 * * *'
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
ref: master
- name: Install and Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build site
run: hugo --enableGitInfo --minify --gc --logLevel info --baseURL https://monal-im.org/
- name: Create tar archive
run: |
tar \
--dereference --hard-dereference \
--directory "public" \
-cvf "$RUNNER_TEMP/master_public.tar" \
--exclude=.git \
--exclude=.github \
.
- name: Upload tar archive to github pages
run: |
git config --local user.email "[email protected]"
git config --local user.name "Monal-IM-Push[BOT]"
git reset --hard
git checkout gh-pages
cp "$RUNNER_TEMP/master_public.tar" "master_public.tar"
git add master_public.tar
git commit -m "Add new master_public.tar"
git push