Skip to content

Commit

Permalink
deploy staging
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed May 26, 2024
1 parent 7f766bd commit f41f2d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
jobs:
test:
runs-on: ubuntu-22.04
if: false
services:
rabbitmq:
image: rabbitmq
Expand Down Expand Up @@ -87,8 +88,7 @@ jobs:
yarn ci
build:
needs: test
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ia-toki'
if: github.ref == 'refs/heads/regrade-loading' && github.repository_owner == 'ia-toki'
runs-on: ubuntu-22.04
env:
CONTAINER_REGISTRY_USERNAME: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
Expand Down Expand Up @@ -137,15 +137,14 @@ jobs:
${{ runner.os }}-yarn-
- name: Build judgels-server
if: steps.changed-files.outputs.judgels-server == '1'
if: false
run: ./deployment/scripts/build_judgels_server.sh

- name: Build judgels-client
if: steps.changed-files.outputs.judgels-client == '1'
run: ./deployment/scripts/build_judgels_client.sh

- name: Build judgels-grader
if: steps.changed-files.outputs.judgels-grader == '1'
if: false
run: ./deployment/scripts/build_judgels_grader.sh

deploy-web:
Expand Down Expand Up @@ -190,7 +189,7 @@ jobs:

deploy-tlx-staging:
needs: build
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ia-toki'
if: github.ref == 'refs/heads/regrade-loading' && github.repository_owner == 'ia-toki'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -212,7 +211,7 @@ jobs:
run: python3 ci/check-changed-files.py | bash

- name: Deploy judgels-server
if: steps.changed-files.outputs.judgels-server == '1'
if: false
run: |
eval "$(ssh-agent -s)"
ssh-add deployment/ansible/env/deployment_rsa
Expand All @@ -226,7 +225,7 @@ jobs:
./deployment/scripts/deploy_judgels_client.sh
- name: Deploy judgels-grader
if: steps.changed-files.outputs.judgels-grader == '1'
if: false
run: |
eval "$(ssh-agent -s)"
ssh-add deployment/ansible/env/deployment_rsa
Expand Down
2 changes: 1 addition & 1 deletion deployment/scripts/build_judgels_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ rm -rf dist/build && mv build dist/
cd ../deployment/ansible

ansible --version 0</dev/null |& cat -
ansible-playbook playbooks/build-judgels-client.yml 0</dev/null |& cat -
ansible-playbook -e app_version=regrade-loading playbooks/build-judgels-client.yml 0</dev/null |& cat -
2 changes: 1 addition & 1 deletion deployment/scripts/deploy_judgels_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -ex
cd deployment/ansible

ansible --version
ansible-playbook -e @env/vars.yml playbooks/deploy-judgels-client.yml
ansible-playbook -e @env/vars.yml -e app_version=regrade-loading playbooks/deploy-judgels-client.yml

0 comments on commit f41f2d6

Please sign in to comment.