-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (86 loc) · 2.41 KB
/
build.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build web
on:
push:
branches:
- feature/github-build
- master
- devel
pull_request:
branches:
- master
- devel
schedule:
- cron: "5 4 2 * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
#- uses: actions/cache@v2
# with:
# path: ~/.cache/my
- name: build image
run: docker build .
- name: build website
run: ./dockerenv-github.sh ./pack.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: site
path: pack.zip
- name: Repack as tar.gz
run: mkdir pack &&
cd pack &&
unzip ../pack.zip &&
mv statistiky/years.json{.new,} &&
tar cvf ../pack.tar .
- name: Upload Github Pages artifact
uses: actions/upload-artifact@v3
with:
name: github-pages
path: pack.tar
test-bleeding-edge-java-and-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build image
run: docker build . --target bleeding-edge
- name: build website
run: env DOCKER_TAG=bleeding-edge ./dockerenv-github.sh ./pack.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: site-for-verification
path: pack.zip
compare:
needs: [build, test-bleeding-edge-java-and-npm]
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: site
path: ./build
- name: Download test-bleeding-edge-java-and-npm artifact
uses: actions/download-artifact@v3
with:
name: site-for-verification
path: ./verification
- name: Extract build artifact
run: mkdir build/unpacked && unzip -d build/unpacked build/pack.zip
- name: Extract test-bleeding-edge-java-and-npm artifact
run: mkdir verification/unpacked && unzip -d verification/unpacked verification/pack.zip
- name: Find
run: find
- name: Compare artifacts
run: diff -r build/unpacked verification/unpacked
deploy-to-github-pages:
needs: [build]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v2