From 0e0c449d2df64cc2b95d91332b3cbc1bd9f0c6c1 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 4 Oct 2024 00:03:58 -0400 Subject: [PATCH] deployment workflow --- .github/workflows/Deployment.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/Deployment.yml diff --git a/.github/workflows/Deployment.yml b/.github/workflows/Deployment.yml new file mode 100644 index 0000000..0fdc4c8 --- /dev/null +++ b/.github/workflows/Deployment.yml @@ -0,0 +1,39 @@ +name: Deployment +on: + push: + branches: + - master +jobs: + install: + name: Install + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "latest" + cache: "npm" + - name: Load node_modules cache + uses: actions/cache@v4 + with: + path: | + **/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: NPM + run: npm ci + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: baobeld/rusty-api:latest