-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.6 KB
/
Copy pathbuild.yml
File metadata and controls
61 lines (52 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "Build"
on:
workflow_dispatch:
schedule:
- cron: '45 4 * * 5' # At 04:45 on Friday
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
website:
name: Website
runs-on: ubuntu-latest
steps:
- name: 🐧 Install dependencies
run: |
sudo apt-get update
sudo apt-get install \
curl \
libdbd-sqlite3-perl \
libjson-xs-perl \
libtemplate-perl \
libtext-csv-perl \
rclone \
sqlite3
- name: 🛎️ Checkout
uses: actions/checkout@v7
- name: 🔨 Run build script
run: |
cd build || exit 9
bash build.sh || exit 9
- name: 🧪 Tests
run: |
grep -q "eu01" "web/eu01.html" || exit 9
grep -q "General Purpose Server" "web/g2i.1.html" || exit 9
jq -e '.[] | .instanceType' "web/instances.json" | grep -q "g2i.1" || exit 9
- name: 🌍 Setup Pages
uses: actions/configure-pages@v6
# https://github.com/marketplace/actions/upload-github-pages-artifact
- name: 🌍 Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: 'web/'
# https://github.com/marketplace/actions/deploy-github-pages-site
- name: 🌍 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
- name: Commit last build
run: |
cd build || exit 9
bash commit.sh || exit 9