Skip to content

Commit d03c117

Browse files
mkozhukhSerhii Pylypchuk
authored andcommitted
[dev] update CI
1 parent 31e1679 commit d03c117

File tree

5 files changed

+1787
-5
lines changed

5 files changed

+1787
-5
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Deploy To Site
66
on:
77
# Triggers the workflow on push or pull request events but only for the master branch
88
push:
9-
branches: [ master ]
9+
branches: [ master, next ]
1010

1111
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1212
jobs:
@@ -19,6 +19,9 @@ jobs:
1919
steps:
2020
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2121
- uses: actions/checkout@v2
22+
- id: vars
23+
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
24+
2225
- uses: actions/setup-node@v2
2326
with:
2427
node-version: '14'
@@ -36,7 +39,6 @@ jobs:
3639
with:
3740
context: .
3841
push: true
39-
tags: registry.webix.io/suite-docs-alt:latest
42+
tags: registry.webix.io/suite-docs-alt:${{ steps.vars.outputs.short_ref }}
4043

41-
- run: curl "http://dhtmlx.com:2280/h00ks/restart-docker?token=${{ secrets.RESTART_TOKEN }}&project=docs-suite-alt"
42-
44+
- run: curl "https://docs.dhtmlx.com/hooks/restart-docker?token=${{ secrets.RESTART_TOKEN }}&project=docs-suite-alt-${{ steps.vars.outputs.short_ref }}"

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
FROM nginx:1.19.6
2+
COPY docker/nginx.conf /etc/nginx/nginx.conf
3+
COPY docker/redirects.conf /etc/nginx/redirects.conf
24
COPY ./build /usr/share/nginx/html

docker/nginx.conf

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
user nginx;
3+
worker_processes 1;
4+
5+
error_log /var/log/nginx/error.log warn;
6+
pid /var/run/nginx.pid;
7+
8+
9+
events {
10+
worker_connections 1024;
11+
}
12+
13+
14+
http {
15+
include /etc/nginx/mime.types;
16+
default_type application/octet-stream;
17+
18+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
19+
'$status $body_bytes_sent "$http_referer" '
20+
'"$http_user_agent" "$http_x_forwarded_for"';
21+
22+
access_log /var/log/nginx/access.log main;
23+
24+
sendfile on;
25+
keepalive_timeout 65;
26+
types_hash_max_size 2048;
27+
map_hash_bucket_size 256;
28+
gzip on;
29+
30+
map_hash_max_size 8192;
31+
map $uri $new_uri {
32+
include /etc/nginx/redirects.conf;
33+
}
34+
35+
server {
36+
listen 80;
37+
listen [::]:80;
38+
server_name localhost;
39+
40+
if ($new_uri){
41+
return 301 $new_uri;
42+
}
43+
44+
location / {
45+
root /usr/share/nginx/html;
46+
index index.html index.htm;
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)