Skip to content

Commit

Permalink
Update github-actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ListKelvin authored Feb 24, 2024
1 parent fcdaf2b commit 25da7aa
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: Deploy
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
run-name: ${{ github.actor }} is testing out GitHub Actions

on:
push:
branches: [main]

jobs:
docker:
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:
- name: Checkout
- uses: actions/checkout@v4
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18

- run: npm ci
- run: npm test
- run: npm run build --if-present
Expand All @@ -38,6 +43,7 @@ jobs:
tags: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Verify
run: echo ${{ steps.docker_build.outputs.digest }}

Expand All @@ -48,8 +54,8 @@ jobs:
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
#!/bin/bash
docker-compose stop
docker-compose rm -f
docker-compose pull
docker-compose up -d
#!/bin/bash
docker-compose stop
docker-compose rm -f
docker-compose pull
docker-compose up -d

0 comments on commit 25da7aa

Please sign in to comment.