File tree 3 files changed +54
-14
lines changed
3 files changed +54
-14
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy build
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ docker :
11
+ runs-on : ubuntu-20.04
12
+ steps :
13
+ -
14
+ name : Checkout
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install dependencies
18
+ uses : php-actions/composer@v6
19
+ with :
20
+ php_version : " 7.4"
21
+ version : 2
22
+
23
+ - name : Build
24
+ run : |
25
+ php7.4 vendor/bin/sculpin generate -vvv -n --env=prod > build_output.log
26
+ if grep -iq "notice\|error\|warning" build_output.log ; then return 1; fi
27
+
28
+ - name : Output
29
+ run : cat build_output.log
30
+
31
+ -
32
+ name : Login to Docker Hub
33
+ uses : docker/login-action@v3
34
+ with :
35
+ username : ${{ vars.DOCKERHUB_USERNAME }}
36
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
37
+ -
38
+ name : Set up QEMU
39
+ uses : docker/setup-qemu-action@v3
40
+ -
41
+ name : Set up Docker Buildx
42
+ uses : docker/setup-buildx-action@v3
43
+ -
44
+ name : Build and push
45
+ uses : docker/build-push-action@v6
46
+ with :
47
+ context : .
48
+ push : true
49
+ tags : phperspl/phpers-website:latest
Original file line number Diff line number Diff line change 1
1
name : Test build
2
2
3
3
on :
4
- push :
5
- branches : [ master ]
6
4
pull_request :
7
5
branches : [ master ]
8
6
9
7
workflow_dispatch :
10
8
11
9
jobs :
12
- build :
10
+ test :
13
11
runs-on : ubuntu-20.04
14
12
15
13
steps :
27
25
if grep -iq "notice\|error\|warning" build_output.log ; then return 1; fi
28
26
29
27
- name : Output
30
- run : cat build_output.log
28
+ run : cat build_output.log
Original file line number Diff line number Diff line change 1
- FROM php:7.4-alpine
1
+ FROM nginx:latest
2
2
3
- RUN apk add --no-cache git curl
4
- RUN curl -o /usr/bin/composer https://getcomposer.org/download/2.2.6/composer.phar
5
- RUN chmod 755 /usr/bin/composer
6
-
7
- VOLUME /app
8
- WORKDIR /app
9
- EXPOSE 8000
10
-
11
- CMD ["/usr/bin/composer" ]
3
+ RUN rm -r /usr/share/nginx/html
4
+ COPY output_prod /usr/share/nginx/html
You can’t perform that action at this time.
0 commit comments