Merge pull request #339 from czqoocavatsim/JoshuaBranch #109
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/ | |
sudo chown -R gander:www-data . | |
sudo find . -type f -exec chmod 664 {} \; | |
sudo find . -type d -exec chmod 775 {} \; | |
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache |