og-image/.woodpecker.yml

40 lines
900 B
YAML
Raw Normal View History

2023-09-29 16:26:39 +02:00
steps:
2023-01-30 10:51:55 +01:00
build:
image: node:16-alpine
commands:
- npm i
2023-02-24 22:18:05 +01:00
- sed -i "s#APP_BASE_URL = '/'#APP_BASE_URL = '/og-image'#" webpack.config.js
2023-01-30 10:51:55 +01:00
- npm run build
2023-01-30 17:47:36 +01:00
when:
2023-01-30 17:48:24 +01:00
branch: [main]
2023-01-30 10:51:55 +01:00
update:
image: alpine/git
commands:
- git fetch --no-tags origin +refs/heads/pages
- git config --global user.email ci@gitnet.fr
- git config --global user.name CI
2023-01-30 11:21:52 +01:00
- git add .
- git commit -m "Build"
- git switch pages
2023-01-30 10:51:55 +01:00
- mv public /tmp/
- rm * -fr
- mv /tmp/public/* .
- git add .
- git commit -m "Build ${CI_BUILD_NUMBER}"
2023-01-30 17:47:36 +01:00
when:
2023-01-30 17:48:24 +01:00
branch: [main]
2023-01-30 10:51:55 +01:00
deploy:
image: appleboy/drone-git-push
commands:
settings:
branch: pages
2023-01-30 11:13:54 +01:00
remote: git@gitnet.fr:deblan/og-image.git
2023-01-30 10:51:55 +01:00
force: false
commit: false
ssh_key:
from_secret: ssh_priv_key
2023-01-30 17:47:36 +01:00
when:
2023-01-30 17:48:24 +01:00
branch: [main]