Update deploy.yml #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Copy repository contents via scp | |
uses: appleboy/scp-action@master | |
with: | |
HOST: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USER }} | |
KEY: ${{ secrets.PASS }} | |
PORT: 22 | |
source: ./ | |
target: /var/www/czqoprod/ | |
- name: Set permissions | |
uses: appleboy/ssh-action@master | |
with: | |
HOST: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USER }} | |
KEY: ${{ secrets.PASS }} | |
PORT: 22 | |
script: | | |
cd /var/www/czqoprod/ | |
chown -R mufassil:www-data . | |
find . -type f -exec chmod 664 {} \; | |
find . -type d -exec chmod 775 {} \; | |
chgrp -R www-data storage bootstrap/cache | |
chmod -R ug+rwx storage bootstrap/cache |