-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (46 loc) · 1.5 KB
/
gh_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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: GitHub Page Deploy
on:
schedule:
- cron: '0 9,15,18,22 * * *'
push:
branches:
- main
jobs:
build-deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.110.0'
extended: true
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('tools/**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Fetch organization
working-directory: tools/organization
run: go run github.com/echocat/echocat.org/tools/organization --output=../../site/data/organization.json --assets=../../site/assets/images/d "--githubAccessToken=${{ secrets.GITHUB_TOKEN }}" "--gitlabAccessToken=${{ secrets.GITLAB_TOKEN }}"
- name: Build page
working-directory: site
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site/public
keep_files: false
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'