67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: Compile Phyre Web Panel
|
|
|
|
on:
|
|
push:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
compile-phyre-web-panel:
|
|
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
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: 8.2
|
|
|
|
- name: Install Composer Dependencies
|
|
working-directory: ./web
|
|
run: |
|
|
rm -rf composer.lock
|
|
composer install
|
|
composer dump-autoload
|
|
|
|
- name: Install NODE Dependencies
|
|
working-directory: ./web
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
|
|
- name: Inject slug/short variables
|
|
uses: rlespinasse/github-slug-action@v3.x
|
|
|
|
- name: Zip the files
|
|
working-directory: ./web
|
|
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 -- {} +
|
|
zip -r phyre-web-panel-dev-unstable.zip `ls -A`
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_user_name: Cloud Vision Bot
|
|
commit_user_email: bobicloudvision@gmail.com
|
|
commit_author: Cloud Vision Bot <bobicloudvision@gmail.com>
|
|
commit_message: Upload compiled packages [BOT]
|
|
branch: web-panel-unstable-dist
|
|
file_pattern: './web/phyre-web-panel-dev-unstable.zip'
|
|
repository: ./dist
|
|
#skip_checkout: true
|
|
#push_options: '--force'
|
|
#skip_fetch: true
|
|
#create_branch: true
|
|
# status_options: '--untracked-files=no'
|