Dodal workflow za produkcijsko okolje
This commit is contained in:
parent
135cc3b4c6
commit
3d218865ef
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Deploy to Production Environment
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Deploy to production environment
|
||||||
|
run: |
|
||||||
|
# Ustvari ciljni direktorij, če ne obstaja
|
||||||
|
mkdir -p /home/spletnimojster-europewonder/htdocs/europewonder.si/wp-content/themes/europewonder
|
||||||
|
|
||||||
|
# Kopiraj vse datoteke iz repozitorija v ciljni direktorij
|
||||||
|
# Uporabi rsync za ohranitev datotek, ki niso v repozitoriju
|
||||||
|
rsync -av --delete \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='.gitea' \
|
||||||
|
--exclude='.github' \
|
||||||
|
--exclude='README.md' \
|
||||||
|
./ /home/spletnimojster-europewonder/htdocs/europewonder.si/wp-content/themes/europewonder/
|
||||||
|
|
||||||
|
echo "Theme deployed to production environment successfully!"
|
||||||
Loading…
Reference in New Issue