Create compile-web-panel.yml
This commit is contained in:
parent
15ef505c00
commit
c6b5c06e87
1 changed files with 60 additions and 0 deletions
60
.github/workflows/compile-web-panel.yml
vendored
Normal file
60
.github/workflows/compile-web-panel.yml
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
name: Compile Phyre Web Panel
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
microweber-build-and-upload-unstable:
|
||||
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
|
||||
cache: 'npm'
|
||||
cache-dependency-path: ./package-lock.json
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
- name: Cache composer dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
# Use composer.json for key, if composer.lock is not committed.
|
||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: composer install
|
||||
|
||||
- name: Dump autoload dependecies
|
||||
run: composer dump-autoload
|
||||
|
||||
- name: Inject slug/short variables
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: Zip the files
|
||||
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-${{ env.GITHUB_REF_SLUG }}-unstable.zip `ls -A`
|
Loading…
Reference in a new issue