26 lines
604 B
YAML
26 lines
604 B
YAML
name: Deploy Website
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 1. Check out the code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 2. Copy files to web directory
|
|
run: |
|
|
echo "Copying files to host folder..."
|
|
cp -R . /mnt/deploy/
|
|
|
|
- name: 3. Set permissions
|
|
run: |
|
|
echo "Setting web server permissions..."
|
|
chown -R www-data:www-data /mnt/deployment
|
|
find /mnt/deployment -type d -exec chmod 755 {} \;
|
|
find /mnt/deployment -type f -exec chmod 644 {} \; |