From 87f578856701aecdc11f8997af37de1b24e6ea9b Mon Sep 17 00:00:00 2001 From: liushuyu Date: Thu, 26 Aug 2021 21:24:52 -0600 Subject: [PATCH] CI: add deploy step to GitHub Actions --- .github/workflows/nodejs.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index cc38352..b4a0918 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [13.x] + node-version: [14.x] steps: - uses: actions/checkout@v2 @@ -23,3 +23,21 @@ jobs: node-version: ${{ matrix.node-version }} - run: yarn - run: yarn build + + deploy: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-buildx-action@v1 + name: Setup Docker BuildX system + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/build-push-action@v2 + name: Deploy the image + with: + push: true + tags: citraemu/discord-bot:latest