-
Notifications
You must be signed in to change notification settings - Fork 59
42 lines (38 loc) · 1.25 KB
/
ubuntu.yml
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
name: ols1clk
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ols1clk:
runs-on: ubuntu-latest
env:
WP_DOMAIN: 'action.example.com'
steps:
- uses: actions/checkout@v2
- name: env setup
run: |
sudo apt-get remove --purge mysql* -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
sudo chmod 666 /etc/hosts
sudo echo "127.0.0.1 ${{ env.WP_DOMAIN }}" >> /etc/hosts
- name: ols1clk installation
run: sudo bash -x ols1clk.sh -W --quiet
- name: Verify
run: curl -skL http://localhost/ | grep -i "WordPress" >/dev/null 2>&1
- name: ols1clk uninstallation
run: sudo bash ols1clk.sh -U --quiet
- name: Verify
run: |
if [ -e $SERVER_ROOT/bin/openlitespeed ]; then
echo 'Uninstallation failed'; exit 1
fi
- name: ols1clk pluss installation
run: sudo bash ols1clk.sh --lsphp 80 --wordpressplus ${{ env.WP_DOMAIN }} --wordpresspath /var/www/html --quiet
- name: Verify
run: curl -skL http://${{ env.WP_DOMAIN }}/ | grep -i "WordPress" >/dev/null 2>&1