File tree 4 files changed +77
-2
lines changed
4 files changed +77
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build template
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+
11
+ - name : Build docker image
12
+ run : docker compose build
13
+
14
+ - name : Run docker container
15
+ run : docker compose up -d
16
+
17
+ - name : Check docker logs
18
+ run : |
19
+ docker ps
20
+ docker compose logs web
21
+
22
+ - name : Test if service is reachable
23
+ run : |
24
+ sleep 30
25
+ curl -v -s --retry 10 --retry-connrefused http://localhost:8000/
26
+
27
+ - name : Report error to Sentry
28
+ if : failure()
29
+ run : |
30
+ curl -sL https://sentry.io/get-cli/ | bash
31
+ export SENTRY_DSN=${{ secrets.SENTRY_DSN }}
32
+ MESSAGE_HEAD='Template: "${{ github.workflow }}" failed in ${{ github.repository }}.'
33
+ MESSAGE_BODY='Check <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}> for more details.'
34
+ sentry-cli send-event -m "$MESSAGE_HEAD" -m "$MESSAGE_BODY" --log-level=error
Original file line number Diff line number Diff line change
1
+ name : Deploy template
2
+
3
+ on :
4
+ push :
5
+ schedule :
6
+ - cron : " 20 16 * * *"
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+
14
+ - name : Set up Python
15
+ uses : actions/setup-python@v5
16
+ with :
17
+ python-version : " 3.12"
18
+
19
+ - name : Install dependencies
20
+ run : |
21
+ python -m pip install --upgrade pip
22
+ pip install divio-cli
23
+
24
+ - name : Deploy to Divio
25
+ run : |
26
+ divio login ${{ secrets.DIVIO_TOKEN }}
27
+ divio app deploy test --remote-id ${{ secrets.DIVIO_WEBSITE_ID }} --build-mode FORCE
28
+
29
+ - name : Test if website is reachable
30
+ run : |
31
+ curl -v -s --retry 10 --retry-connrefused ${{ secrets.WEBSITE_URL }}
32
+
33
+ - name : Report error to Sentry
34
+ if : failure()
35
+ run : |
36
+ curl -sL https://sentry.io/get-cli/ | bash
37
+ export SENTRY_DSN=${{ secrets.SENTRY_DSN }}
38
+ MESSAGE_HEAD='Template: "${{ github.workflow }}" failed in ${{ github.repository }}.'
39
+ MESSAGE_BODY='Check <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}> for more details.'
40
+ sentry-cli send-event -m "$MESSAGE_HEAD" -m "$MESSAGE_BODY" --log-level=error
Original file line number Diff line number Diff line change 76
76
77
77
# Divio Cloud config
78
78
config . hosts = [
79
- /.*\. aldryn\. io/
79
+ /.*\. aldryn\. io/ ,
80
+ '0.0.0.0' ,
80
81
]
81
82
end
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: "3"
3
3
services :
4
4
web :
5
5
build : .
6
- command : ./bin/rails server -e development -b 0.0.0.0 -p 80
6
+ command : ./bin/rails server -e development -p 80 - b 0.0.0.0
7
7
volumes :
8
8
- .:/rails
9
9
ports :
You can’t perform that action at this time.
0 commit comments