Author SHA1 Message Date
benjamyn 80226e74ee Update .github/workflows/deploy.yml
deploy / production (push) Has been cancelled
2023-10-14 04:00:20 -04:00
benjamyn 6d01839b55 Update .github/workflows/deploy.yml
deploy / production (push) Successful in 8m41s
2023-10-12 23:36:37 -04:00
benjamyn c5238ed53b Merge pull request 'Test - On tag' (#27) from feat/autodeploy into master
deploy / production (push) Has been cancelled
Reviewed-on: #27
2023-10-12 02:49:26 -04:00
ben 55777ddd7c On tag 2023-10-12 02:48:32 -04:00
benjamyn f9167a6bdc Merge pull request 'feat/autodeploy' (#26) from feat/autodeploy into master
Reviewed-on: #26
2023-10-12 02:37:59 -04:00
ben 3302835838 Fix idehelperissues? 2023-10-12 02:24:23 -04:00
ben bf8dda5a4c Fixed deploy 2023-10-12 01:28:34 -04:00
ben cfa9be4705 Testing 2023-10-12 00:55:34 -04:00
ben 9e8bdd30d9 Added autodeploy 2023-10-11 23:14:46 -04:00
kdonaldson 25323b4cef Merge pull request 'Fix NPM build scripts' (#25) from bugfix/npm-scripts into master
Reviewed-on: #25
2023-10-11 05:13:41 -04:00
kdonaldson 5bbf2d193a fix: install fonts as dev depenencies
feat: spit vendor chunks on vite build
2023-10-11 20:07:38 +11:00
kdonaldson 348e99d6c7 fix: remove vue-tsc from build scripts
fix: set NODE_ENV on watch
2023-10-11 19:43:00 +11:00
benjamyn 84529c373d Merge pull request 'fix/headerauth-crash-missing-header' (#19) from fix/headerauth-crash-missing-header into master
Reviewed-on: #19
2023-10-11 00:58:54 -04:00
benjamyn b03ad75e9e Merge branch 'master' into fix/headerauth-crash-missing-header 2023-10-11 00:56:48 -04:00
ben 7bf42dcc47 Updated the header check 2023-10-10 22:54:28 -04:00
benjamyn 9c1c781595 Merge pull request 'chore/clean-up-01' (#20) from chore/clean-up-01 into master
Reviewed-on: #20
2023-10-10 19:24:52 -04:00
ben 7a8b0fdf10 empty instead of is_null 2023-10-10 01:35:45 -04:00
ben 8519764f8f Merge branch 'feat/user-reg-api' into fix/headerauth-crash-missing-header 2023-10-10 01:34:55 -04:00
ben 8021b9e3e2 Fixed crash on missing header 2023-10-10 00:49:29 -04:00
8 changed files with 158 additions and 17 deletions

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
name: deploy
on:
push:
tags:
- 'v*'
concurrency: production_environment
jobs:
production:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v3
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tools: composer
extensions: bcmath, ctype, fileinfo, json, odbc, mbstring, openssl, pdo, pdo_mysql, pdo_odbc tokenizer, xml, soap, redis, igbinary
php-version: "8.2"
- name: Install dependencies
run: composer install --no-interaction --no-scripts --prefer-dist
- name: Deploy
uses: deployphp/action@v1
with:
private-key: ${{ secrets.DEPLOY_KEY }}
dep: deploy production
+4
View File
@@ -15,6 +15,10 @@ class HeaderAuth
*/
public function handle(Request $request, Closure $next): Response
{
if (! $request->hasHeader('X-BOTAUTH')) {
return response()
->json(["status" => false, "message" => "Unauthorized."], 401);
}
if (!hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) {
return response('Unauthorized', 401);
}
+1
View File
@@ -15,6 +15,7 @@
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.13",
"deployer/deployer": "^7.3",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.24",
"laravel/pint": "^1.0",
Generated
+45 -2
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "feae295eec753591e7cf70bf21f57924",
"content-hash": "6f613b80fde0f91b5425be61accfc51f",
"packages": [
{
"name": "brick/math",
@@ -6158,6 +6158,49 @@
],
"time": "2022-11-17T09:50:14+00:00"
},
{
"name": "deployer/deployer",
"version": "v7.3.1",
"source": {
"type": "git",
"url": "https://github.com/deployphp/deployer.git",
"reference": "c5c5e79d4e57445918ed24a9cdd3d85b0f261de3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/deployphp/deployer/zipball/c5c5e79d4e57445918ed24a9cdd3d85b0f261de3",
"reference": "c5c5e79d4e57445918ed24a9cdd3d85b0f261de3",
"shasum": ""
},
"bin": [
"dep"
],
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anton Medvedev",
"email": "anton@medv.io"
}
],
"description": "Deployment Tool",
"homepage": "https://deployer.org",
"support": {
"docs": "https://deployer.org/docs",
"issues": "https://github.com/deployphp/deployer/issues",
"source": "https://github.com/deployphp/deployer"
},
"funding": [
{
"url": "https://github.com/sponsors/antonmedv",
"type": "github"
}
],
"time": "2023-04-05T09:24:30+00:00"
},
{
"name": "doctrine/cache",
"version": "2.2.0",
@@ -9758,5 +9801,5 @@
"php": "^8.1"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace Deployer;
require 'recipe/laravel.php';
require 'contrib/npm.php';
// Config
set('git_ssh_command', 'ssh');
set('repository', 'ssh://git@ssh.git.lovelynet.net:9001/PriceyBot/PriceyBotPanel.git');
add('shared_files', []);
add('shared_dirs', []);
add('writable_dirs', []);
set('http_user', 'nginx');
set('http_group', 'nginx');
set('writable_mode', 'chmod');
// Hosts
host('production')
->set('hostname', 'vps.benjamyn.love')
->set('port', '22')
->set('remote_user', 'root')
->set('deploy_path', '/opt/PriceyBotPanel');
// Tasks
task('npm:build', function () {
$command = match (get('alias')) {
'production' => 'production',
'staging' => 'development',
default => 'production'
};
run("cd {{release_path}} && {{bin/npm}} run {$command}");
});
task('perm:fix', function () {
run("chown -R nginx:nginx /opt/PriceyBotPanel");
});
// Hooks
after('deploy:vendors', 'npm:install');
after('npm:install', 'npm:build');
after('npm:build', 'perm:fix');
after('deploy:failed', 'deploy:unlock');
+6 -6
View File
@@ -4,12 +4,10 @@
"requires": true,
"packages": {
"": {
"dependencies": {
"@fontsource/cooper-hewitt": "^5.0.7",
"@fortawesome/fontawesome-free": "^6.4.2"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"@fontsource/cooper-hewitt": "^5.0.7",
"@fortawesome/fontawesome-free": "^6.4.2",
"@tailwindcss/forms": "^0.5.6",
"autoprefixer": "^10.4.2",
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.8.0",
@@ -385,12 +383,14 @@
"node_modules/@fontsource/cooper-hewitt": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/@fontsource/cooper-hewitt/-/cooper-hewitt-5.0.7.tgz",
"integrity": "sha512-TDbBV/TJGWeHxuBKIgF+yq1sQcOvRswEF0kwJ07FbEXEWYW4fR3uqrpMrGmlUWQKoMlSgo6EKe+u5dr3rJhrnQ=="
"integrity": "sha512-TDbBV/TJGWeHxuBKIgF+yq1sQcOvRswEF0kwJ07FbEXEWYW4fR3uqrpMrGmlUWQKoMlSgo6EKe+u5dr3rJhrnQ==",
"dev": true
},
"node_modules/@fortawesome/fontawesome-free": {
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz",
"integrity": "sha512-m5cPn3e2+FDCOgi1mz0RexTUvvQibBebOUlUlW0+YrMjDTPkiJ6VTKukA1GRsvRw+12KyJndNjj0O4AgTxm2Pg==",
"dev": true,
"hasInstallScript": true,
"engines": {
"node": ">=6"
+6 -8
View File
@@ -3,26 +3,24 @@
"type": "module",
"scripts": {
"dev": "npm run development",
"development": "vue-tsc --noEmit && NODE_ENV=development vite build --sourcemap -m development",
"watch": "vite build -m development --watch",
"development": "NODE_ENV=development vite build --sourcemap -m development",
"watch": "NODE_ENV=development vite build -m development --watch",
"prod": "npm run production",
"production": "vue-tsc --noEmit && NODE_ENV=production vite build -m production",
"production": "NODE_ENV=production vite build -m production",
"lint": "eslint --ext .js,.ts,.vue --fix resources/js"
},
"browserslist": [
"last 3 versions"
],
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"@fontsource/cooper-hewitt": "^5.0.7",
"@fortawesome/fontawesome-free": "^6.4.2",
"@tailwindcss/forms": "^0.5.6",
"autoprefixer": "^10.4.2",
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.8.0",
"postcss": "^8.4.6",
"tailwindcss": "^3.1.0",
"vite": "^4.0.0"
},
"dependencies": {
"@fontsource/cooper-hewitt": "^5.0.7",
"@fortawesome/fontawesome-free": "^6.4.2"
}
}
+2 -1
View File
@@ -1,4 +1,4 @@
import { defineConfig } from 'vite';
import { defineConfig, splitVendorChunkPlugin } from "vite";
import laravel from 'laravel-vite-plugin';
export default defineConfig({
@@ -10,5 +10,6 @@ export default defineConfig({
],
refresh: true,
}),
splitVendorChunkPlugin()
],
});