new deploy CI
This commit is contained in:
parent
eea9e81b23
commit
621c97ab39
|
@ -24,14 +24,15 @@ jobs:
|
||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
source: "./*"
|
source: "./*"
|
||||||
target: "."
|
target: "rtl-epub-maker"
|
||||||
# - name: unpack tarball and restart app
|
- name: unpack tarball and restart app
|
||||||
# uses: appleboy/ssh-action@v1.0.0
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
# with:
|
with:
|
||||||
# host: ${{ secrets.HOST }}
|
host: ${{ secrets.HOST }}
|
||||||
# username: ${{ secrets.USERNAME }}
|
username: ${{ secrets.USERNAME }}
|
||||||
# key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
# port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
# script:
|
script: |
|
||||||
|
rm -rf apps/live/rtl-epub-maker
|
||||||
# pm2 restart account
|
mv rtl-epub-maker apps/live
|
||||||
|
pm2 restart account
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: CI
|
||||||
|
# TODO: use caching
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/rtl-epub-maker:latest
|
Loading…
Reference in New Issue