Add deploy file #5
@@ -28,6 +28,10 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs
|
||||
working-directory:
|
||||
required: false
|
||||
type: string
|
||||
default: ./
|
||||
username:
|
||||
required: false
|
||||
type: string
|
||||
@@ -46,17 +50,19 @@ jobs:
|
||||
username: ${{ inputs.username }}
|
||||
password: ${{ inputs.password }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup composer
|
||||
uses: https://git.qlic.nl/actions/setup-composer@v1
|
||||
uses: https://git.qlic.nl/actions/setup-composer@39079e200da5483e53afeff1be193daec6ed561a
|
||||
with:
|
||||
args: ${{ inputs.composer-args }}
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
||||
- name: Set working directory
|
||||
run: cd ${{ inputs.working-directory }}
|
||||
|
||||
- name: Create .env file from secret
|
||||
if: ${{ secrets.env }}
|
||||
run: echo "${{ secrets.env }}" > .env
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
||||
- name: Build
|
||||
if: ${{ inputs.node-package-manager }}
|
||||
@@ -74,17 +80,21 @@ jobs:
|
||||
if [ "${{ inputs.node-package-manager }}" != "none" ] && [ -n "${{ inputs.node-package-manager }}" ]; then
|
||||
${{ inputs.node-package-manager }} run build
|
||||
fi
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
||||
|
||||
- name: Set up SSH agent
|
||||
uses: webfactory/ssh-agent@v0.5.3
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.ssh-private-key }}
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
||||
- name: Disable strict host key checking
|
||||
run: |
|
||||
echo "Host *" >> ~/.ssh/config
|
||||
echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
||||
- name: Deploy
|
||||
run: vendor/bin/dep deploy environment="${{ inputs.environment }}"
|
||||
run: vendor/bin/dep deploy ${{ inputs.environment }}
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.idea
|
Reference in New Issue
Block a user