update logger #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy for dev | |
on: | |
push: | |
branches: ["dev_go"] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: saturday | |
IMAGE_NAME_FULL: ghcr.io/nbtca/saturday | |
jobs: | |
dev_Deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "dev_go" | |
- name: Login DockerHub | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push to DockerHub | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
no-cache: true | |
push: true | |
platforms: linux/amd64 | |
tags: | | |
${{ env.IMAGE_NAME_FULL }}:dev | |
${{ env.IMAGE_NAME_FULL }}:latest | |
- name: ssh pipelines | |
uses: cross-the-world/ssh-pipeline@master | |
env: | |
DB_URL: ${{ secrets.DB_URL }} | |
ACCESS_KEY_ID: ${{ env.ACCESS_KEY_ID }} | |
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }} | |
APPID: ${{ env.APPID }} | |
SECRET: ${{ secrets.SECRET }} | |
MAIL_HOST: ${{ secrets.MAIL_HOST }} | |
MAIL_PORT: ${{ secrets.MAIL_PORT }} | |
MAIL_USERNAME: ${{ secrets.MAIL_USERNAME }} | |
MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }} | |
PORT: ${{ env.PORT }} | |
RPC_ADDRESS: ${{ env.RPC_ADDRESS }} | |
with: | |
host: ${{ secrets.REMOTE_HOST }} | |
user: ${{ secrets.REMOTE_USER }} | |
key: ${{ secrets.ACCESS_TOKEN }} | |
connect_timeout: 10s | |
script: | | |
cd /home/nbtca/weekend/saturday_dev | |
docker compose stop && docker compose rm -f | |
docker compose pull | |
docker compose up -d |