first commit
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Adler Neves 2023-08-12 20:15:44 -03:00
commit eb7fd943fa
4 changed files with 49 additions and 0 deletions

44
.drone.yml Normal file
View File

@ -0,0 +1,44 @@
kind: pipeline
type: exec
name: default
clone:
depth: 50
steps:
- name: analyze
environment:
SONAR_TOKEN:
from_secret: sonar_token
commands:
- if [[ -z "$(curl -s https://qa.adlerneves.com | grep '502 Bad Gateway')" ]]; then /opt/sonar-scanner/bin/sonar-scanner -Dsonar.login=$$SONAR_TOKEN ; fi
- name: submodules
depends_on:
- analyze
commands:
- git config --global url.https://git.adlerneves.com/.insteadOf "gitea@git.adlerneves.com:"
- git submodule update --init --recursive --remote
- name: build
depends_on:
- submodules
commands:
- echo "Nothing to do..."
- name: deploy
depends_on:
- build
commands:
- mkdir -p local/sites/redirects/files
- sudo rm -rf /var/lib/static-site-server-rs/sites/redirects
- sudo mkdir -p /var/lib/static-site-server-rs/sites/redirects/files
- sudo cp -R local/sites/redirects/files/. /var/lib/static-site-server-rs/sites/redirects/files/.
- sudo install -m 644 -T local/sites/redirects/site.yaml /var/lib/static-site-server-rs/sites/redirects/site.yaml
- sudo chown http:http -R /var/lib/static-site-server-rs/sites/redirects
- name: reload
depends_on:
- deploy
commands:
- sudo touch /var/lib/static-site-server-rs/routes.yaml

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/local/routes.yaml

0
README.md Normal file
View File

View File

@ -0,0 +1,4 @@
- domain: "*.adlerosn.com"
mode: RedirectKeepingRouteAndSubdomain
redirect: "adlerneves.com"
hsts: true