simplify pipeline setup
This commit is contained in:
parent
d25440f051
commit
dfffa20e78
|
@ -13,6 +13,21 @@ defaults:
|
|||
shell: sh
|
||||
|
||||
jobs:
|
||||
phpdoc:
|
||||
runs-on: alpine-3.16
|
||||
steps:
|
||||
- name: phpdoc
|
||||
run: php81 /phpDocumentor.phar -d classes -d include -t phpdoc --visibility=public
|
||||
|
||||
- name: prepare ssh
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.APK_DEPLOY_SSH_KEY }}" | tr -d \\r > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
- name: upload results
|
||||
run: rsync -e 'ssh -o StrictHostKeyChecking=no' phpdoc/ ${{ secrets.APK_DEPLOY_USER }}@${{ secrets.APK_DEPLOY_HOST }}:phpdoc/
|
||||
|
||||
build:
|
||||
runs-on: alpine-3.16
|
||||
steps:
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
name: lint
|
||||
|
||||
on:
|
||||
- push
|
||||
- workflow_dispatch
|
||||
- pull_request
|
||||
push:
|
||||
branches-ignore:
|
||||
- "master"
|
||||
workflow_dispatch: {}
|
||||
pull_request: {}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
|
@ -36,16 +38,5 @@ jobs:
|
|||
- name: phpunit
|
||||
run: php81 ./vendor/bin/phpunit
|
||||
|
||||
- uses: https://github.com/actions/cache/restore@v3
|
||||
id: cache-phpstan
|
||||
with:
|
||||
path: /tmp/phpstan
|
||||
key: ${{ runner.os }}-phpstan-${{ steps.cache-hash.outputs.hash }}
|
||||
|
||||
- name: phpstan
|
||||
run: php81 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G
|
||||
|
||||
- uses: https://github.com/actions/cache/save@v3
|
||||
with:
|
||||
path: /tmp/phpstan
|
||||
key: ${{ steps.cache-phpstan.outputs.cache-primary-key }}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
workflow_dispatch: {}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: alpine-3.16
|
||||
steps:
|
||||
- name: phpdoc
|
||||
run: php81 /phpDocumentor.phar -d classes -d include -t phpdoc --visibility=public
|
||||
|
||||
- name: prepare ssh
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.APK_DEPLOY_SSH_KEY }}" | tr -d \\r > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
- name: upload results
|
||||
run: rsync -e 'ssh -o StrictHostKeyChecking=no' phpdoc/ ${{ secrets.APK_DEPLOY_USER }}@${{ secrets.APK_DEPLOY_HOST }}:phpdoc/
|
Loading…
Reference in New Issue