Skip to content

Update dependency react-parallax-tilt to v1.7.210 #11

Update dependency react-parallax-tilt to v1.7.210

Update dependency react-parallax-tilt to v1.7.210 #11

Workflow file for this run

name: Continous Deployment
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
build:
name: Build and push latest image
runs-on: homepage-runners
container:
image: gcr.io/kaniko-project/executor:debug
permissions: # Permissions for GITHUB_TOKEN
contents: read
packages: write
steps:
- name: Build and push container with Kaniko to ghcr
run: |
AUTH=$(echo -n ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} | base64)
echo "{\"auths\": {\"ghcr.io\": {\"auth\": \"${AUTH}\"}}}" > /kaniko/.docker/config.json
/kaniko/executor --dockerfile="./Dockerfile" \
--context="${{ github.repositoryUrl }}#${{ github.sha }}" \
--destination="ghcr.io/bl4ko/homepage:latest" \
--push-retry 5 \
--image-name-with-digest-file /workspace/image-digest.txt
deploy:
name: Deploy application to server
runs-on: homepage-runners
needs: build
steps:
- name: Add key from variable
run: |
echo "${{ secrets.DEPLOY_KEY }}" > ./key && chmod 600 ./key
- name: Install ssh client if not installed
run: |
sudo apt-get update && sudo apt-get install openssh-client -y
- name: Connect to host and update
run: |
ssh -o StrictHostKeyChecking=no -i ./key -p ${{ secrets.DEPLOY_PORT }} ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} '~/.local/bin/kubectl rollout restart deployment/portfolio -n portfolio'