mirror of
https://github.com/koreanbots/core.git
synced 2026-02-01 17:20:24 +00:00
ci: added git hash branch parse script in auto deploy
This commit is contained in:
parent
6d95807e64
commit
b196b8300f
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@ -62,7 +62,7 @@ jobs:
|
|||||||
- name: Setup environments
|
- name: Setup environments
|
||||||
run: |
|
run: |
|
||||||
mv .env.demo.local .env.production.local
|
mv .env.demo.local .env.production.local
|
||||||
echo 'MARIADB_ROOT_PASSWORD=YOUSHALLNOTPASS' > .env
|
printf 'MARIADB_ROOT_PASSWORD=YOUSHALLNOTPASS\nCOMMIT_HASH=${{ github.sha }}' > .env
|
||||||
- name: Create needed files
|
- name: Create needed files
|
||||||
run: echo '{"tester":"DEMO_KEY"}' > secret.json
|
run: echo '{"tester":"DEMO_KEY"}' > secret.json
|
||||||
- name: Docker Compose
|
- name: Docker Compose
|
||||||
@ -79,4 +79,4 @@ jobs:
|
|||||||
host: ${{ secrets.HOST }}
|
host: ${{ secrets.HOST }}
|
||||||
username: ${{ secrets.USERNAME }}
|
username: ${{ secrets.USERNAME }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
script: cd ${{ secrets.BETA_DIR }} && git stash && git pull && docker-compose up --build -d
|
script: cd ${{ secrets.BETA_DIR }} && git stash && git pull && printf "NEXT_PUBLIC_COMMIT_HASH=$(git rev-parse HEAD)\nNEXT_PUBLIC_BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')" > .env.local && docker-compose up --build -d
|
||||||
Loading…
x
Reference in New Issue
Block a user