Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9aa0e21aa | ||
|
|
42e7b8f93f | ||
|
|
6647487bcb | ||
|
|
181411f40a |
1 changed files with 9 additions and 28 deletions
|
|
@ -8,38 +8,19 @@ steps:
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
# Push le contenu du dossier public sur le dépôt `pages` de git.polarolouis.fr
|
|
||||||
# On utilise l'image alpine/git pour avoir git et ssh
|
|
||||||
|
|
||||||
deploy-site:
|
deploy-site:
|
||||||
image: alpine/git
|
image: curlimages/curl:8.5.0
|
||||||
commands:
|
commands:
|
||||||
- git config --global --add safe.directory /woodpecker/src/git.polarolouis.fr/polarolouis/site-perso
|
- tar -czf /tmp/site.tar.gz -C /woodpecker/src/git.polarolouis.fr/polarolouis/site-perso/public .
|
||||||
- git config --global --add safe.directory /woodpecker/src/git.polarolouis.fr/polarolouis/pages
|
- |
|
||||||
- git config --global user.name "Woodpecker CI"
|
curl -f -X POST https://pages.polarolouis.fr/api/pages \
|
||||||
- git config --global user.email "git@polarolouis.fr"
|
-F "domain=polarolouis.pages.polarolouis.fr" \
|
||||||
- cd /woodpecker/src/git.polarolouis.fr/polarolouis/
|
-F "file=@/tmp/site.tar.gz"
|
||||||
- git clone "https://git.polarolouis.fr/polarolouis/pages.git"
|
|
||||||
- rm -rf pages/*
|
|
||||||
- cp -r site-perso/public/* pages/
|
|
||||||
- cp site-perso/.domains pages/
|
|
||||||
- cd pages
|
|
||||||
- ls -la
|
|
||||||
- git remote set-url origin "https://$${ACCESS_TOKEN}@git.polarolouis.fr/polarolouis/pages.git"
|
|
||||||
- git add --all
|
|
||||||
- git commit -m "Deploy site [CI SKIP]"
|
|
||||||
- git push -f origin main
|
|
||||||
environment:
|
|
||||||
ACCESS_TOKEN:
|
|
||||||
from_secret: access_token
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- render-site
|
- render-site
|
||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
event: push
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue