@@ -314,157 +314,49 @@ jobs:
314314 steps :
315315 - run : true
316316
317- deploy-beta :
318- name : " Deploy to beta-h.skauting.cz"
319- if : github.ref == 'refs/heads/beta'
320- needs : [checks-passed]
321- runs-on : ubuntu-22.04
322- container :
323- image : skaut/lebeda:8.2-ci
324- steps :
325- - name : Debug branch
326- run : |
327- echo "Current ref: $GITHUB_REF"
328- - name : Download workdir
329- uses : actions/download-artifact@v4
330- with :
331- name : workdir
332- path : .
333- - name : Extract workdir
334- run : tar -xzpf workdir.tar.gz
335- - name : Setup SSH authentication
336- run : .github/workflows/setup_ssh.sh "$DEPLOY_SSH_KEY" "$SSH_KEY_FILE"
337- env :
338- DEPLOY_SSH_KEY : ${{ secrets.DEPLOY_SSH_KEY }}
339- SSH_KEY_FILE : /root/.ssh/id_key
340-
341- # Copy & paste from https://github.com/actions/cache/blob/master/examples.md#node---yarn
342- - name : Get yarn cache
343- id : yarn-cache
344- run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
345-
346- - uses : actions/cache@v4
347- with :
348- path : ${{ steps.yarn-cache.outputs.dir }}
349- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
350- restore-keys : |
351- ${{ runner.os }}-yarn-
352- - name : Install Node.js
353- uses : actions/setup-node@v4
354- with :
355- node-version : ' 20'
356-
357- - name : Setup git safe dir
358- run : git config --global --add safe.directory /__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}
359-
360- - name : Deploy to beta-h.skauting.cz
361- run : phing deploy
362- env :
363- ENVIRONMENT : beta
364- ROOT_DIR : /home/vu011961
365- SSH_USERNAME : vu011961
366- SSH_KEY_FILE : /root/.ssh/id_key
367- CONFIG_APPLICATION_ID : ${{ secrets.CONFIG_BETA_SKAUTIS_APPLICATION_ID }}
368- CONFIG_DATABASE_PASSWORD : ${{ secrets.CONFIG_BETA_DATABASE_PASSWORD }}
369- CONFIG_GOOGLE_CREDENTIALS : ${{ secrets.CONFIG_BETA_GOOGLE_CREDENTIALS }}
370-
371- deploy-test :
372- name : " Deploy to test-h.skauting.cz"
373- if : github.ref == 'refs/heads/master'
374- needs : [checks-passed]
375- runs-on : ubuntu-22.04
376- container :
377- image : skaut/lebeda:8.1-ci
378- steps :
379- - name : Download workdir
380- uses : actions/download-artifact@v4
381- with :
382- name : workdir
383- path : .
384- - name : Extract workdir
385- run : tar -xzpf workdir.tar.gz
386- - name : Setup SSH authentication
387- run : .github/workflows/setup_ssh.sh "$DEPLOY_SSH_KEY" "$SSH_KEY_FILE"
388- env :
389- DEPLOY_SSH_KEY : ${{ secrets.DEPLOY_SSH_KEY }}
390- SSH_KEY_FILE : /root/.ssh/id_key
391-
392- # Copy & paste from https://github.com/actions/cache/blob/master/examples.md#node---yarn
393- - name : Get yarn cache
394- id : yarn-cache
395- run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
396-
397- - uses : actions/cache@v4
398- with :
399- path : ${{ steps.yarn-cache.outputs.dir }}
400- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
401- restore-keys : |
402- ${{ runner.os }}-yarn-
403- - name : Install Node.js
404- uses : actions/setup-node@v4
405- with :
406- node-version : ' 20'
407-
408- - name : Setup git safe dir
409- run : git config --global --add safe.directory /__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}
410-
411- - name : Deploy to test-h.skauting.cz
412- run : phing deploy
413- env :
414- ENVIRONMENT : test
415- ROOT_DIR : /home/vu009010
416- SSH_USERNAME : vu009010
417- SSH_KEY_FILE : /root/.ssh/id_key
418- CONFIG_DATABASE_PASSWORD : ${{ secrets.CONFIG_TEST_DATABASE_PASSWORD }}
419- CONFIG_GOOGLE_CREDENTIALS : ${{ secrets.CONFIG_TEST_GOOGLE_CREDENTIALS }}
420-
421- deploy-production :
422- name : " Deploy to h.skauting.cz"
423- if : github.ref == 'refs/heads/master'
424- needs : [checks-passed]
425- runs-on : ubuntu-22.04
426- container :
427- image : skaut/lebeda:8.2-ci
428- steps :
429- - name : Download workdir
430- uses : actions/download-artifact@v4
431- with :
432- name : workdir
433- path : .
434- - name : Extract workdir
435- run : tar -xzpf workdir.tar.gz
436- - name : Setup SSH authentication
437- run : .github/workflows/setup_ssh.sh "$DEPLOY_SSH_KEY" "$SSH_KEY_FILE"
438- env :
439- DEPLOY_SSH_KEY : ${{ secrets.DEPLOY_SSH_KEY }}
440- SSH_KEY_FILE : /root/.ssh/id_key
441-
442- # Copy & paste from https://github.com/actions/cache/blob/master/examples.md#node---yarn
443- - name : Get yarn cache
444- id : yarn-cache
445- run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
446-
447- - uses : actions/cache@v4
448- with :
449- path : ${{ steps.yarn-cache.outputs.dir }}
450- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
451- restore-keys : |
452- ${{ runner.os }}-yarn-
453- - name : Install Node.js
454- uses : actions/setup-node@v4
455- with :
456- node-version : ' 20'
457-
458- - name : Setup git safe dir
459- run : git config --global --add safe.directory /__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}
460-
461- - name : Deploy to h.skauting.cz
462- run : phing deploy
463- env :
464- ENVIRONMENT : production
465- ROOT_DIR : /home/vu008930
466- SSH_USERNAME : vu008930
467- SSH_KEY_FILE : /root/.ssh/id_key
468- CONFIG_DATABASE_PASSWORD : ${{ secrets.CONFIG_PRODUCTION_DATABASE_PASSWORD }}
469- CONFIG_SENTRY_DSN : ${{ secrets.CONFIG_SENTRY_DSN }}
470- CONFIG_GOOGLE_CREDENTIALS : ${{ secrets.CONFIG_PRODUCTION_GOOGLE_CREDENTIALS }}
317+ deploy-beta :
318+ if : github.ref == 'refs/heads/beta'
319+ needs : [checks-passed]
320+ uses : ./.github/workflows/deploy-template.yml
321+ with :
322+ environment : beta
323+ root_dir : /home/vu011961
324+ ssh_username : vu011961
325+ host : www.skauting.cz
326+ port : " 11961"
327+ secrets :
328+ DEPLOY_SSH_KEY : ${{ secrets.DEPLOY_SSH_KEY }}
329+ CONFIG_APPLICATION_ID : ${{ secrets.CONFIG_BETA_SKAUTIS_APPLICATION_ID }}
330+ CONFIG_DATABASE_PASSWORD : ${{ secrets.CONFIG_BETA_DATABASE_PASSWORD }}
331+ CONFIG_GOOGLE_CREDENTIALS : ${{ secrets.CONFIG_BETA_GOOGLE_CREDENTIALS }}
332+
333+ deploy-test :
334+ if : github.ref == 'refs/heads/master'
335+ needs : [checks-passed]
336+ uses : ./.github/workflows/deploy-template.yml
337+ with :
338+ environment : test
339+ root_dir : /home/vu009010
340+ ssh_username : vu009010
341+ host : www.skauting.cz
342+ port : " 9010"
343+ secrets :
344+ DEPLOY_SSH_KEY : ${{ secrets.DEPLOY_SSH_KEY }}
345+ CONFIG_DATABASE_PASSWORD : ${{ secrets.CONFIG_TEST_DATABASE_PASSWORD }}
346+ CONFIG_GOOGLE_CREDENTIALS : ${{ secrets.CONFIG_TEST_GOOGLE_CREDENTIALS }}
347+
348+ deploy-production :
349+ if : github.ref == 'refs/heads/master'
350+ needs : [checks-passed]
351+ uses : ./.github/workflows/deploy-template.yml
352+ with :
353+ environment : production
354+ root_dir : /home/vu008930
355+ ssh_username : vu008930
356+ host : www.skauting.cz
357+ port : 8930
358+ secrets :
359+ DEPLOY_SSH_KEY : ${{ secrets.DEPLOY_SSH_KEY }}
360+ CONFIG_DATABASE_PASSWORD : ${{ secrets.CONFIG_PRODUCTION_DATABASE_PASSWORD }}
361+ CONFIG_GOOGLE_CREDENTIALS : ${{ secrets.CONFIG_PRODUCTION_GOOGLE_CREDENTIALS }}
362+ CONFIG_SENTRY_DSN : ${{ secrets.CONFIG_SENTRY_DSN }}
0 commit comments