chore: release v2.1.4 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
build-args: | | |
"VITE_API_BASE_URL=${{ vars.VITE_API_BASE_URL_PROD }}" | |
"VITE_CLERK_PUBLISHABLE_KEY=${{ secrets.VITE_CLERK_PUBLISHABLE_KEY_PROD }}" | |
"VITE_VAPID_PUBLIC_KEY=${{ secrets.VITE_VAPID_PUBLIC_KEY }}" | |
platforms: linux/amd64,linux/arm64/v8 | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }} | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
VERSION: ${{ github.ref_name }} | |
steps: | |
- run: | | |
mkdir ~/.ssh | |
echo "$SSH_KEY" > ~/.ssh/github | |
chmod 600 ~/.ssh/github | |
cat >> ~/.ssh/config << END | |
Host github | |
HostName $SSH_HOST | |
User $SSH_USER | |
IdentityFile ~/.ssh/github | |
StrictHostKeyChecking no | |
END | |
- run: ssh -i ~/.ssh/github github 'cd /docker/scheduler-react && echo VERSION=${{ github.ref_name }} > .env && sudo docker compose up -d' |