Skip to content

Commit 4f5eacd

Browse files
Move domain, upgrade symfony
1 parent 766a110 commit 4f5eacd

21 files changed

+784
-783
lines changed

.env

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the latter taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
# https://symfony.com/doc/current/configuration/secrets.html
13+
#
14+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
15+
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
16+
17+
###> symfony/framework-bundle ###
18+
APP_ENV=dev
19+
APP_SECRET=27ece57ba8aa437809ed5e6ef26e4636
20+
###< symfony/framework-bundle ###

.github/workflows/ci-prod.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
workflow_dispatch:
3+
push:
4+
branches:
5+
- main
6+
name: CI:test
7+
jobs:
8+
9+
deploy-test:
10+
name: Deploy to hatt.style
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.0'
17+
- name: Get composer cache directory
18+
id: composer-cache
19+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
20+
- name: Cache dependencies
21+
uses: actions/cache@v1
22+
with:
23+
path: ${{ steps.composer-cache.outputs.dir }}
24+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
25+
restore-keys: ${{ runner.os }}-composer-
26+
- name: Install dependencies
27+
run: composer install --no-dev --prefer-dist
28+
# - name: Get npm cache directory
29+
# id: npm-cache
30+
# run: |
31+
# echo "::set-output name=dir::$(npm config get cache)"
32+
# - uses: actions/cache@v1
33+
# with:
34+
# path: ${{ steps.npm-cache.outputs.dir }}
35+
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
36+
# restore-keys: |
37+
# ${{ runner.os }}-node-
38+
# - name: Install JavaScript dependencies
39+
# run: npm install
40+
- name: Deploy over FTPS
41+
env:
42+
USERNAME: ${{ secrets.DEPLOY_USERNAME }}
43+
PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
44+
run: php ./Deploy.php --environment=prod --username="$USERNAME"

.github/workflows/ci-test.yml .github/workflows/ci-staging.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: CI:test
66
jobs:
77

88
deploy-test:
9-
name: Deploy to flatastic.hatt.style
9+
name: Deploy to hatt.style
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2

Deploy.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function getRemotePublicPath() {
3131
}
3232

3333
public function getRemotePublicUrl() {
34-
return "https://flatastic.hatt.style";
34+
return "https://hatt.style";
3535
}
3636

3737
public function getRemotePrivatePath() {
@@ -42,7 +42,7 @@ public function install($public_path) {
4242
$fs = new Symfony\Component\Filesystem\Filesystem();
4343
$fs->mirror(__DIR__.'/public', $public_path, null, ['delete' => true]);
4444
$index_path = "{$public_path}/index.php";
45-
$index_contents = file_get_contents($index_path);
45+
$index_contents = file_get_contents(__DIR__.'/public/index.php');
4646
$updated_index_contents = str_replace(
4747
"require_once dirname(__DIR__).'/vendor/autoload_runtime.php';",
4848
"require_once dirname(__DIR__).'/private/deploy/live/vendor/autoload_runtime.php';",

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# flatastic.hatt.style
2-
API to use flatastic app with home assistant
1+
# hatt.style
2+
3+
All my hobby projects

bin/console

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
use App\Kernel;
55
use Symfony\Bundle\FrameworkBundle\Console\Application;
66

7+
if (!is_dir(dirname(__DIR__).'/vendor')) {
8+
throw new LogicException('Dependencies are missing. Try running "composer install".');
9+
}
10+
711
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
812
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
913
}

composer.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "allestuetsmerweh/flatastic.hatt.style",
2+
"name": "allestuetsmerweh/hatt.style",
33
"type": "project",
44
"license": "MIT",
55
"authors": [
@@ -11,21 +11,21 @@
1111
"minimum-stability": "stable",
1212
"prefer-stable": true,
1313
"require": {
14-
"php": ">=8.0.2",
14+
"php": ">=8.2",
1515
"ext-ctype": "*",
1616
"ext-iconv": "*",
17-
"allestuetsmerweh/php-deploy": "^1.0",
18-
"league/flysystem": "^2.3",
19-
"league/flysystem-ftp": "^2.3",
17+
"allestuetsmerweh/php-deploy": "^2.7",
18+
"league/flysystem": "^3.29",
19+
"league/flysystem-ftp": "^3.29",
2020
"symfony/apache-pack": "^1.0",
21-
"symfony/console": "6.0.*",
22-
"symfony/dotenv": "6.0.*",
21+
"symfony/console": "7.1.*",
22+
"symfony/dotenv": "7.1.*",
2323
"symfony/flex": "^2",
24-
"symfony/framework-bundle": "6.0.*",
25-
"symfony/http-client": "6.0.*",
24+
"symfony/framework-bundle": "7.1.*",
25+
"symfony/http-client": "7.1.*",
2626
"symfony/monolog-bundle": "^3.8",
27-
"symfony/runtime": "6.0.*",
28-
"symfony/yaml": "6.0.*"
27+
"symfony/runtime": "7.1.*",
28+
"symfony/yaml": "7.1.*"
2929
},
3030
"config": {
3131
"allow-plugins": {
@@ -75,7 +75,7 @@
7575
"extra": {
7676
"symfony": {
7777
"allow-contrib": false,
78-
"require": "6.0.*"
78+
"require": "7.1.*"
7979
}
8080
}
8181
}

0 commit comments

Comments
 (0)