diff --git a/.github/workflows/client-cd.yml b/.github/workflows/client-cd.yml index 6adc807..e3c829e 100644 --- a/.github/workflows/client-cd.yml +++ b/.github/workflows/client-cd.yml @@ -7,12 +7,12 @@ on: paths: - "client/**" # limit workflow only to changes in frontend folder - ".github/workflows/server-cd.yml" - pull_request: - branches: - - main - paths: - - "client/**" - - ".github/workflows/client-cd.yml" +# pull_request: +# branches: +# - main +# paths: +# - "client/**" +# - ".github/workflows/client-cd.yml" defaults: @@ -44,8 +44,8 @@ jobs: run: npm run compile publish: - needs: build - if: github.ref == 'refs/heads/main' +# needs: build +# if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: checkout current repository @@ -73,6 +73,7 @@ jobs: username: ${{ secrets.SSH_USER }} key: ${{ secrets.SSH_KEY }} port: ${{ secrets.SSH_PORT }} + protocol: tcp6 source: "client/build/**" target: "/var/www/stonks" strip_components: 2 diff --git a/.github/workflows/server-cd.yml b/.github/workflows/server-cd.yml index ad64fe6..020dc9b 100644 --- a/.github/workflows/server-cd.yml +++ b/.github/workflows/server-cd.yml @@ -15,63 +15,63 @@ on: - ".github/workflows/server-cd.yml" jobs: - build: - runs-on: ubuntu-latest - steps: - - name: checkout current repository - uses: actions/checkout@v4 - - - name: set up Java 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: build application jar - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - arguments: build - build-root-directory: server - - - name: create server artifact from jar - if: github.ref == 'refs/heads/main' - uses: actions/upload-artifact@v4 - with: - name: server - path: server/build +# build: +# runs-on: ubuntu-latest +# steps: +# - name: checkout current repository +# uses: actions/checkout@v4 +# +# - name: set up Java 21 +# uses: actions/setup-java@v4 +# with: +# java-version: '21' +# distribution: 'temurin' +# +# - name: build application jar +# uses: gradle/actions/setup-gradle@v3 +# with: +# gradle-version: wrapper +# arguments: build +# build-root-directory: server +# +# - name: create server artifact from jar +## if: github.ref == 'refs/heads/main' +# uses: actions/upload-artifact@v4 +# with: +# name: server +# path: server/build publish: needs: build - if: github.ref == 'refs/heads/main' +# if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: checkout current repository uses: actions/checkout@v4 - - name: download server artifact - uses: actions/download-artifact@v4 - with: - name: server - path: server/build - - - name: set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: log in to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: build and publish server Docker image - uses: docker/build-push-action@v6 - with: - context: server - file: server/docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: stenal/baltic-stock-server:latest +# - name: download server artifact +# uses: actions/download-artifact@v4 +# with: +# name: server +# path: server/build +# +# - name: set up Docker Buildx +# uses: docker/setup-buildx-action@v3 +# +# - name: log in to DockerHub +# uses: docker/login-action@v3 +# with: +# username: ${{ secrets.DOCKER_USERNAME }} +# password: ${{ secrets.DOCKER_PASSWORD }} +# +# - name: build and publish server Docker image +# uses: docker/build-push-action@v6 +# with: +# context: server +# file: server/docker/Dockerfile +# platforms: linux/amd64,linux/arm64 +# push: true +# tags: stenal/baltic-stock-server:latest - name: setup SSH shell: bash @@ -81,7 +81,7 @@ jobs: touch /home/runner/.ssh/id_rsa echo -e "${{secrets.SSH_KEY}}" > /home/runner/.ssh/id_rsa chmod 700 /home/runner/.ssh/id_rsa - ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts + ssh-keyscan -t rsa,dsa,ecdsa,ed25519 laane.xyz >> /home/runner/.ssh/known_hosts - name: run Ansible deployment playbook shell: bash