This commit is contained in:
parent
3007772b87
commit
d933c8c55f
1 changed files with 10 additions and 7 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
branch: develop
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
render-site:
|
render-site:
|
||||||
image: ghcr.io/quarto-dev/quarto:1.7.22
|
image: ghcr.io/quarto-dev/quarto:1.7.22
|
||||||
|
|
@ -7,7 +12,7 @@ steps:
|
||||||
when:
|
when:
|
||||||
event: [push, pull_request, cron, manual]
|
event: [push, pull_request, cron, manual]
|
||||||
branch:
|
branch:
|
||||||
- main
|
- develop
|
||||||
# Push le contenu du dossier public sur le dépôt `pages` de git.polarolouis.fr
|
# 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
|
# On utilise l'image alpine/git pour avoir git et ssh
|
||||||
|
|
||||||
|
|
@ -16,23 +21,21 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- git config --global user.name "Woodpecker CI"
|
- git config --global user.name "Woodpecker CI"
|
||||||
- git config --global user.email "git@polarolouis.fr"
|
- git config --global user.email "git@polarolouis.fr"
|
||||||
- git clone -b pages "https://$${ACCESS_TOKEN}@git.polarolouis.fr/polarolouis/these-recap-hebdo.git" $DESTINATION
|
- git clone -b main "https://$${ACCESS_TOKEN}@git.polarolouis.fr/polarolouis/these-recap-hebdo.git" $DESTINATION
|
||||||
- rm -rf $DESTINATION/* && echo "Cleaned $DESTINATION" || echo "Failed to clean $DESTINATION"
|
- rm -rf $DESTINATION/* && echo "Cleaned $DESTINATION" || echo "Failed to clean $DESTINATION"
|
||||||
- cp -ar $CI_WORKSPACE/public/* $DESTINATION/
|
- cp -ar $CI_WORKSPACE/public/* $DESTINATION/
|
||||||
- cd $DESTINATION
|
- cd $DESTINATION
|
||||||
- ls -la
|
- ls -la
|
||||||
- git add --all
|
- git add --all
|
||||||
- git commit -m "Deploy site ${CI_BUILD_CREATED} [CI SKIP]" || echo "Nothing to commit"
|
- git commit -m "Deploy site $CI_BUILD_CREATED [CI SKIP]" || echo "Nothing to commit"
|
||||||
- git push && echo "Pushed to $DESTINATION" || echo "Failed to push to $DESTINATION"
|
- git push && echo "Pushed to $DESTINATION" || echo "Failed to push to $DESTINATION"
|
||||||
environment:
|
environment:
|
||||||
ACCESS_TOKEN:
|
ACCESS_TOKEN:
|
||||||
from_secret: access_token
|
from_secret: access_token
|
||||||
DESTINATION: pages
|
DESTINATION: pages
|
||||||
when:
|
when:
|
||||||
event:
|
event: [push, pull_request, cron, manual]
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
branch:
|
branch:
|
||||||
- main
|
- develop
|
||||||
depends_on:
|
depends_on:
|
||||||
- render-site
|
- render-site
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue