Changing CI to upload to git-pages
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
79c817298e
commit
181411f40a
1 changed files with 8 additions and 23 deletions
|
|
@ -8,37 +8,22 @@ 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: alpine:3.19
|
||||||
commands:
|
commands:
|
||||||
- git config --global --add safe.directory /woodpecker/src/git.polarolouis.fr/polarolouis/site-perso
|
- apk add --no-cache curl tar
|
||||||
- git config --global --add safe.directory /woodpecker/src/git.polarolouis.fr/polarolouis/pages
|
- cd /woodpecker/src/git.polarolouis.fr/polarolouis/site-perso/public
|
||||||
- git config --global user.name "Woodpecker CI"
|
- tar -czf /tmp/site.tar.gz .
|
||||||
- git config --global user.email "git@polarolouis.fr"
|
- |
|
||||||
- cd /woodpecker/src/git.polarolouis.fr/polarolouis/
|
curl -X POST https://pages.polarolouis.fr/api/pages \
|
||||||
- git clone "https://git.polarolouis.fr/polarolouis/pages.git"
|
-F "domain=polarolouis.pages.polarolouis.fr" \
|
||||||
- rm -rf pages/*
|
-F "file=@/tmp/site.tar.gz"
|
||||||
- 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:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue