feat: add CI for deploying the website
Some checks failed
Deploy Website / deploy (push) Has been cancelled
Some checks failed
Deploy Website / deploy (push) Has been cancelled
This commit is contained in:
26
.gitea/workflows/deploy.yml
Normal file
26
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Deploy Website
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: deploy-website
|
||||||
|
|
||||||
|
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 {} \;
|
||||||
Reference in New Issue
Block a user