Skip to content

🔨 refactor(library): request #114

🔨 refactor(library): request

🔨 refactor(library): request #114

Workflow file for this run

name: CI/CD
on:
push:
branches: ['master']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: install pnpm
run: npm install -g pnpm
- name: pnpm install
run: pnpm install
- name: build @apps/admin
run: pnpm --filter @apps/admin... build
- name: build @apps/micro
run: pnpm --filter @apps/micro... build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push the Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./.github/workflows/Dockerfile
push: true
tags: tingcode/web-admin:latest
- name: ssh docker login
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: sh web_admin.sh