-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (41 loc) · 1.16 KB
/
build-website.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
54
# SPDX-FileCopyrightText: 2022 XMPP Providers Team
#
# SPDX-License-Identifier: CC0-1.0
name: Website Build
on:
push:
branches: [ master ]
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
# Build website every day at 4:00 UTC
schedule:
- cron: "0 4 * * *"
jobs:
build:
runs-on: ubuntu-latest
env:
ARCHIVE: providers-xmpp-net-master.tar.gz
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python packages
run: pip install -r tools/requirements.txt
- name: Prepare provider list
run: python tools/prepare.py
- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.110.0'
- name: Build website
run: hugo
- name: Create build archive
run: tar -czf ${{ env.ARCHIVE }} "./public"
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: providers-xmpp-net-master
path: ${{ env.ARCHIVE }}