Skip to content

upates

upates #31

Workflow file for this run

name: build-and-deploy
on:
push:
branches: ['main', 'testing']
jobs:
# docker-build-push:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to github docker registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# uses: docker/login-action@v2
# with:
# registry: registry.gitlab.com
# username: ${{ secrets.GITLAB_REGISTRY_USERNAME }}
# password: ${{ secrets.GITLAB_REGISTRY_TOKEN }}
# - name: build
# run: |
# docker buildx build -t ghcr.io/${{ github.repository_owner }}/copypaste_react:latest --push --platform=linux/arm64,linux/amd64 .
# docker build -t registry.gitlab.com/do-copypaste/copypaste_node:latest .
# docker push registry.gitlab.com/do-copypaste/copypaste_node:latest
# - name: Set up QEM
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Build and push
# uses: docker/build-push-action@v3
# with:
# context: .
# platforms: linux/amd64
# push: true
# tags: registry.gitlab.com/do-copypaste/copypaste_node:latest
deploy:
# needs: docker-build-push
runs-on: ubuntu-latest
steps:
- name: multiple command
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.HOSTNAME }}
username: ubuntu
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
ls -al
cd copypaste_react
ls
git pull
docker compose up -d --build
docker image prune -f