-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.5 KB
/
deploy-website.yml
File metadata and controls
48 lines (41 loc) · 1.5 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
45
46
47
48
name: "build"
on: push
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
name: Clone
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
run: |
wget --quiet https://github.com/gohugoio/hugo/releases/download/v0.100.1/hugo_0.100.1_Linux-64bit.tar.gz
tar -xzvf hugo_0.100.1_Linux-64bit.tar.gz
rm -f hugo_0.100.1_Linux-64bit.tar.gz
rm -f LICENSE
rm -f README.md
- name: Fallback
run: ./.github/trans-copy
- name: Build
run: |
./hugo --minify
rm hugo
- name: Update "website"
run: |
mv ./public ..
git checkout website
mv CNAME ../public/
rm -rf *
mv ../public/* .
rm -f .hugo_build.lock
- name: Commit
run: |
git config --global user.name 'Thibault Meyer'
git config --global user.email 'thibaultmeyer@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add .
git commit -am "Automated website build"
git push