mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 18:52:08 +00:00
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
kind: pipeline
|
|
name: default
|
|
type: docker
|
|
|
|
steps:
|
|
- name: Submodules
|
|
image: alpine/git
|
|
commands:
|
|
- git submodule update --init --recursive
|
|
- git submodule foreach git checkout master
|
|
- git submodule foreach git pull origin master
|
|
|
|
- name: Prepare
|
|
image: node:alpine
|
|
commands:
|
|
- apk -q add yarn
|
|
- yarn
|
|
- yarn db:compile
|
|
|
|
- name: Compile
|
|
image: node:alpine
|
|
commands:
|
|
- apk -q add yarn
|
|
- rm -r dist/*
|
|
- yarn gen
|
|
- CARDLANG=fr yarn gen
|
|
|
|
- name: Push
|
|
image: alpine/git
|
|
commands:
|
|
- cd dist
|
|
- git config --global user.email "$PUSH_EMAIL"
|
|
- git config --global user.name "$PUSH_NAME"
|
|
- git add .
|
|
- git commit -m "Updated API"
|
|
- git push -u origin master
|
|
environment:
|
|
PUSH_EMAIL:
|
|
from_secret: PUSH_EMAIL
|
|
PUSH_NAME:
|
|
from_secret: PUSH_NAME
|
|
|
|
- name: Upload
|
|
image: node:alpine
|
|
commands:
|
|
- node upload.js
|
|
environment:
|
|
UPLOAD_USERNAME:
|
|
from_secret: UPLOAD_USERNAME
|
|
UPLOAD_PASSWORD:
|
|
from_secret: UPLOAD_PASSWORD
|
|
UPLOAD_DIST:
|
|
from_secret: UPLOAD_DIST
|
|
UPLOAD_REMOTE:
|
|
from_secret: UPLOAD_REMOTE
|