2024-04-06 18:26:33 +00:00
|
|
|
name: Compile Phyre Web Panel
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
2024-04-06 18:43:49 +00:00
|
|
|
compile-phyre-web-panel:
|
2024-04-06 18:26:33 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: ${{ github.repository }}
|
|
|
|
- name: Npm install
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
2024-04-06 18:45:24 +00:00
|
|
|
|
2024-04-06 19:35:36 +00:00
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: 8.2
|
2024-04-06 19:41:54 +00:00
|
|
|
|
2024-04-06 18:55:36 +00:00
|
|
|
- name: Install Composer Dependencies
|
|
|
|
working-directory: ./web
|
2024-04-06 18:43:49 +00:00
|
|
|
run: |
|
2024-04-06 18:57:27 +00:00
|
|
|
rm -rf composer.lock
|
2024-04-06 18:43:49 +00:00
|
|
|
composer install
|
|
|
|
composer dump-autoload
|
2024-04-06 18:57:27 +00:00
|
|
|
|
2024-04-06 18:56:22 +00:00
|
|
|
- name: Install NODE Dependencies
|
|
|
|
working-directory: ./web
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run build
|
2024-04-06 18:26:33 +00:00
|
|
|
|
|
|
|
- name: Inject slug/short variables
|
|
|
|
uses: rlespinasse/github-slug-action@v3.x
|
|
|
|
|
|
|
|
- name: Zip the files
|
2024-04-06 18:55:36 +00:00
|
|
|
working-directory: ./web
|
2024-04-06 18:26:33 +00:00
|
|
|
run: |
|
|
|
|
rm -rf .git
|
|
|
|
rm -rf .github
|
|
|
|
rm -rf .nmp
|
|
|
|
rm -rf node_modules
|
|
|
|
rm -rf .phpunit.cache
|
|
|
|
rm -rf vendor/composer/tmp-*.zip
|
|
|
|
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} +
|
2024-04-06 19:49:17 +00:00
|
|
|
zip -r phyre-web-panel-build.zip `ls -A`
|
2024-04-06 21:42:26 +00:00
|
|
|
mkdir -p ../dist
|
|
|
|
mv ./phyre-web-panel-build.zip ../dist/phyre-web-panel.zip
|
2024-04-06 20:01:30 +00:00
|
|
|
|
|
|
|
- name: Pushes to Phyre Panel Dist Repo
|
|
|
|
uses: cpina/github-action-push-to-another-repository@main
|
|
|
|
env:
|
|
|
|
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
|
|
|
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
2024-04-06 19:41:54 +00:00
|
|
|
with:
|
2024-04-06 20:01:30 +00:00
|
|
|
source-directory: './dist'
|
2024-04-06 20:13:25 +00:00
|
|
|
destination-github-username: 'CloudVisionApps'
|
2024-04-06 21:27:21 +00:00
|
|
|
destination-repository-name: 'PhyrePanelWebDist'
|
2024-04-06 20:01:30 +00:00
|
|
|
user-email: bobicloudvision@gmail.com
|
|
|
|
target-branch: main
|