-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from garasijogi/staging
To the first Realease
- Loading branch information
Showing
107 changed files
with
4,002 additions
and
1,051 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Merge and Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
merge-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# merge this branch to deploy/ztemplate | ||
- uses: actions/checkout@master | ||
- name: Merge ${{ github.ref }} > deploy/ztemplate | ||
uses: devmasx/merge-branch@v1.3.1 | ||
with: | ||
type: now | ||
from_branch: ${{ github.ref }} | ||
target_branch: deploy/ztemplate | ||
github_token: ${{ github.token }} | ||
|
||
# remove local workspaces; remove all files in the environment | ||
- uses: AutoModality/action-clean@v1 | ||
|
||
# checkout deploy/ztemplate | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: deploy/ztemplate | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
# merge deploy/ztemplate to deploy/run | ||
- uses: actions/checkout@master | ||
- name: Merge deploy/ztemplate > deploy/run | ||
uses: devmasx/merge-branch@v1.3.1 | ||
with: | ||
type: now | ||
from_branch: ${{ github.ref }} | ||
target_branch: deploy/run | ||
github_token: ${{ github.token }} | ||
|
||
# remove local workspaces; remove all files in the environment | ||
- uses: AutoModality/action-clean@v1 | ||
|
||
# checkout deploy/run | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: deploy/run | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
# update npm and composer packages | ||
- name: Install or update dependencies; Create local changes | ||
run: | | ||
composer update --no-dev --optimize-autoloader | ||
composer dump-autoload -o | ||
npm install && npm run prod | ||
# see changed files | ||
- name: See the status of git | ||
run: git status | ||
|
||
# list files | ||
- name: List files in the repository | ||
run: | | ||
ls -l ${{ github.workspace }} | ||
# commit changes to deploy/run branch | ||
- name: Commit changed files | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add . | ||
git commit -m "merge and deploy workflow" -a | ||
# push changes to origin deploy/run | ||
- name: Push changes to deploy/run | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: deploy/run | ||
|
||
# SSH commands to access production server | ||
- name: Do some shells in the production server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOSTINGER_SSH_HOST }} | ||
username: ${{ secrets.HOSTINGER_USERNAME }} | ||
password: ${{ secrets.HOSTINGER_FTP_PASSWORD }} | ||
port: ${{ secrets.HOSTINGER_SSH_PORT }} | ||
script: | | ||
bash .0IMPORTANT/github-actions/deployer-main.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Merge and Stage | ||
on: | ||
push: | ||
branches: | ||
- staging | ||
jobs: | ||
merge-and-stage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# merge this branch to deploy/ztemplate-staging | ||
- uses: actions/checkout@master | ||
- name: Merge ${{ github.ref }} > deploy/ztemplate-staging | ||
uses: devmasx/merge-branch@v1.3.1 | ||
with: | ||
type: now | ||
from_branch: ${{ github.ref }} | ||
target_branch: deploy/ztemplate-staging | ||
github_token: ${{ github.token }} | ||
|
||
# remove local workspaces; remove all files in the environment | ||
- uses: AutoModality/action-clean@v1 | ||
|
||
# checkout deploy/ztemplate-staging | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: deploy/ztemplate-staging | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
# merge deploy/ztemplate-staging to deploy/staging | ||
- uses: actions/checkout@master | ||
- name: Merge deploy/ztemplate-staging > deploy/staging | ||
uses: devmasx/merge-branch@v1.3.1 | ||
with: | ||
type: now | ||
from_branch: ${{ github.ref }} | ||
target_branch: deploy/staging | ||
github_token: ${{ github.token }} | ||
|
||
# remove local workspaces; remove all files in the environment | ||
- uses: AutoModality/action-clean@v1 | ||
|
||
# checkout deploy/staging | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: deploy/staging | ||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
# update npm and composer packages | ||
- name: Install or update dependencies; Create local changes | ||
run: | | ||
composer update --no-dev --optimize-autoloader | ||
composer dump-autoload -o | ||
npm install && npm run prod | ||
# see changed files | ||
- name: See the status of git | ||
run: git status | ||
|
||
# list files | ||
- name: List files in the repository | ||
run: | | ||
ls -l ${{ github.workspace }} | ||
# commit changes to deploy/staging branch | ||
- name: Commit changed files | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add . | ||
git commit -m "merge and deploy workflow" -a | ||
# push changes to origin deploy/staging | ||
- name: Push changes to deploy/staging | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: deploy/staging | ||
|
||
# SSH commands to access production server | ||
- name: Do some shells in the production server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOSTINGER_SSH_HOST }} | ||
username: ${{ secrets.HOSTINGER_USERNAME }} | ||
password: ${{ secrets.HOSTINGER_FTP_PASSWORD }} | ||
port: ${{ secrets.HOSTINGER_SSH_PORT }} | ||
script: | | ||
bash .0IMPORTANT/github-actions/deployer-staging.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Books_package extends Model | ||
{ | ||
public $timestamps = false; | ||
protected $primaryKey = 'id'; | ||
public $incrementing = false; | ||
protected $keyType = 'string'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class DisplayedPromo extends Model | ||
{ | ||
protected $fillable = ['promo_id']; | ||
public $timestamps = false; | ||
|
||
public function promo() | ||
{ | ||
return $this->belongsTo(Promo::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Displayed_feedback extends Model | ||
{ | ||
protected $guarded = []; | ||
|
||
public function feedback() | ||
{ | ||
return $this->belongsTo(Feedback::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.