← Back
Editing: deploy-sandbox.yaml
name: Deploy to servers on: workflow_run: workflows: - CI types: - completed jobs: deploy-staging: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'dev' }} steps: - uses: actions/checkout@v3 with: ref: ${{ github.event.workflow_run.head_branch }} - name: Unlock secrets uses: sliteteam/github-action-git-crypt-unlock@1.2.0 env: GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }} - name: Copy specific env files to project run: | cp -R ./deploy/sandbox/. . - name: Cache Composer dependencies uses: actions/cache@v3 with: path: /tmp/composer-cache key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - name: Composer install uses: php-actions/composer@v6 with: memory_limit: 512M php_version: "8.1" args: --ignore-platform-reqs --no-scripts - uses: c-hive/gha-yarn-cache@v2 - name: Compile JS assets run: yarn install && yarn encore dev - name: rsync deployments uses: burnett01/rsync-deployments@6.0.0 with: switches: -avzr --delete --exclude="var" path: . remote_path: /home/arithmetic/manager/web remote_host: sandbox.arithmetic.fr remote_user: arithmetic remote_key: ${{ secrets.DEPLOY_KEY_SANDBOX }}
Save File
Cancel