File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [master]
6
+
7
+ jobs :
8
+
9
+ build-and-deploy :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+
15
+ - name : Setup Python
16
+ uses : actions/setup-python@v4
17
+ with :
18
+ python-version : 3.x
19
+
20
+ - name : Cache dependencies
21
+ uses : actions/cache@v3
22
+ with :
23
+ key : mkdocs-material-${{ runner.os }}-${{ hashFiles('**/requirements.txt') }}
24
+ path : .cache
25
+
26
+ - name : Install dependencies
27
+ run : |
28
+ pip3 install -U -r requirements.txt
29
+
30
+ - name : Build site
31
+ run : mkdocs build
32
+
33
+ - name : Check Deployment
34
+ run : |
35
+ if [ -d "site" ]; then
36
+ echo "Deploy would have succeeded!"
37
+ else
38
+ echo "Deploy would have failed!"
39
+ gh pr close ${{ github.event.pull_request.number }}
40
+ exit 1
41
+ fi
You can’t perform that action at this time.
0 commit comments