Add deployment yaml
This commit is contained in:
57
.gitea/workflows/deploy.yml
Normal file
57
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: spot
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSER_NO_INTERACTION: "1"
|
||||||
|
COMPOSER_HOME: .composer
|
||||||
|
DEPLOY_PATH: /var/www/spot
|
||||||
|
npm_config_cache: .npm-cache
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check runner tools
|
||||||
|
run: |
|
||||||
|
command -v composer
|
||||||
|
command -v npm
|
||||||
|
command -v rsync
|
||||||
|
|
||||||
|
- name: Check deploy path
|
||||||
|
run: |
|
||||||
|
test -d "$DEPLOY_PATH"
|
||||||
|
test -w "$DEPLOY_PATH"
|
||||||
|
|
||||||
|
- name: Validate Composer configuration
|
||||||
|
run: composer validate --no-check-publish
|
||||||
|
|
||||||
|
- name: Install PHP dependencies
|
||||||
|
run: composer install --no-dev --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Install npm dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build frontend
|
||||||
|
run: npm run prod
|
||||||
|
|
||||||
|
- name: Deploy to production
|
||||||
|
run: |
|
||||||
|
rsync -az --delete \
|
||||||
|
--exclude ".git/" \
|
||||||
|
--exclude ".gitea/" \
|
||||||
|
--exclude ".composer/" \
|
||||||
|
--exclude ".npm-cache/" \
|
||||||
|
--exclude "node_modules/" \
|
||||||
|
--exclude "config/settings.php" \
|
||||||
|
--exclude "files/" \
|
||||||
|
--exclude "geo/" \
|
||||||
|
--exclude "gaia/" \
|
||||||
|
./ "$DEPLOY_PATH/"
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
"type": "path",
|
"type": "git",
|
||||||
"url": "../objects"
|
"url": "https://git.lutran.fr/franzz/objects"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
|
|||||||
14
composer.lock
generated
14
composer.lock
generated
@@ -4,15 +4,15 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "12bb836a394b645df50c14652a2ae5bf",
|
"content-hash": "3ff17875c13e3d001ef6ba3353e933e5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "franzz/objects",
|
"name": "franzz/objects",
|
||||||
"version": "dev-vue",
|
"version": "dev-vue",
|
||||||
"dist": {
|
"source": {
|
||||||
"type": "path",
|
"type": "git",
|
||||||
"url": "../objects",
|
"url": "https://git.lutran.fr/franzz/objects",
|
||||||
"reference": "c0c0b21290b5ee617158c6152cac809eccd67472"
|
"reference": "eb9f2f4cacbb3526d371b345f5bed29eb84c597f"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -21,9 +21,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "Objects",
|
"description": "Objects",
|
||||||
"transport-options": {
|
"time": "2026-05-12T09:11:09+00:00"
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpmailer/phpmailer",
|
"name": "phpmailer/phpmailer",
|
||||||
|
|||||||
Reference in New Issue
Block a user