This commit is contained in:
parent
f8b1650519
commit
29050dd640
1 changed files with 40 additions and 0 deletions
40
.woodpecker.yml
Normal file
40
.woodpecker.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
steps:
|
||||
render-site:
|
||||
image: ghcr.io/quarto-dev/quarto:1.7.22
|
||||
commands:
|
||||
- cd $CI_REPO_NAME
|
||||
- quarto render
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- 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:
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git config --global user.name "Woodpecker CI"
|
||||
- git config --global user.email "git@polarolouis.fr"
|
||||
- git clone -b pages "https://$${ACCESS_TOKEN}git.polarolouis.fr/polarolouis/these-recap-hebdo.git" $DESTINATION
|
||||
- rm -rf $DESTINATION/* && echo "Cleaned $DESTINATION" || echo "Failed to clean $DESTINATION"
|
||||
- cp -ar $CI_REPO_NAME/* $DESTINATION/
|
||||
- cd $DESTINATION
|
||||
- ls -la
|
||||
- git add --all
|
||||
- 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"
|
||||
environment:
|
||||
ACCESS_TOKEN:
|
||||
from_secret: access_token
|
||||
DESTINATION: pages
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- main
|
||||
depends_on:
|
||||
- render-site
|
||||
Loading…
Add table
Reference in a new issue