-
Notifications
You must be signed in to change notification settings - Fork 2
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 #79 from Invertus/github-action-for-deploy-addition
SL-126 Github actions for deploy addition
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Apache 2.2 | ||
<IfModule !mod_authz_core.c> | ||
Order deny,allow | ||
Deny from all | ||
</IfModule> | ||
|
||
# Apache 2.4 | ||
<IfModule mod_authz_core.c> | ||
Require all denied | ||
</IfModule> |
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,35 @@ | ||
name: Deploy | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: build | ||
# IF YOU EDIT THIS, DON'T FORGET TO EDIT release.yml | ||
run: | | ||
composer install --no-dev --optimize-autoloader --classmap-authoritative | ||
composer dump-autoload --no-dev --optimize --classmap-authoritative | ||
cp .github/.htaccess vendor/.htaccess | ||
rm -rf .git | ||
rm -rf .github | ||
rm -rf tests | ||
rm -rf cypress | ||
rm -rf .docker | ||
mkdir saferpayofficial | ||
rsync -Rr ./ ./saferpayofficial | ||
shopt -s extglob | ||
rm -r !(saferpayofficial) | ||
find . -maxdepth 1 -type f -exec rm "{}" \; | ||
cd saferpayofficial && rm -rf saferpayofficial | ||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: saferpayofficial | ||
path: | | ||
. |
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,45 @@ | ||
name: release | ||
on: | ||
release: | ||
types: [ published, edited, updated, drafted] | ||
jobs: | ||
build_release: | ||
name: build_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: build | ||
# IF YOU EDIT THIS, DON'T FORGET TO EDIT deploy.yml | ||
run: | | ||
composer install --no-dev --optimize-autoloader --classmap-authoritative | ||
composer dump-autoload --no-dev --optimize --classmap-authoritative | ||
cp .github/.htaccess vendor/.htaccess | ||
rm -rf .git | ||
rm -rf .github | ||
rm -rf tests | ||
rm -rf cypress | ||
rm -rf .docker | ||
mkdir saferpayofficial | ||
rsync -Rr ./ ./saferpayofficial | ||
shopt -s extglob | ||
rm -r !(saferpayofficial) | ||
find . -maxdepth 1 -type f -exec rm "{}" \; | ||
cd saferpayofficial && rm -rf saferpayofficial | ||
cd ../ && zip -r saferpayofficial.zip saferpayofficial/ | ||
- name: Update release | ||
id: update_release | ||
uses: tubone24/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.github_token }} | ||
with: | ||
upload_url: ${{ steps.update_release.outputs.upload_url }} | ||
asset_path: ./saferpayofficial.zip | ||
asset_name: saferpayofficial.zip | ||
asset_content_type: application/zip |