Skip to content

feat(app): fixed form api endpoint #25

feat(app): fixed form api endpoint

feat(app): fixed form api endpoint #25

Workflow file for this run

name: Publish and deploy Docker image
on:
push:
branches:
- main
release:
types:
- published
jobs:
publish:
name: Publish Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Auth GitHub
uses: docker/#-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add tags and labels
id: meta
uses: docker/metadata-action@v5
with:
images:
ghcr.io/${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Build
uses: docker/setup-buildx-action@v3
- name: Push Docker image
uses: docker/build-push-action@v5
with:
push: true
context: ./app
file: ./app/Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/${{ github.repository }}:latest"
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"NUXT_APP_URL=${{ secrets.APP_URL }}"
"NUXT_MAIL_URL=${{ secrets.MAIL_URL }}"
deploy:
name: Deploy Docker to a Linux instance
runs-on: ubuntu-latest
needs: publish
steps:
- name: Deploy into a Server with SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
key: ${{ secrets.SERVER_KEY }}
script: ${{ vars.SCRIPT }} ${{ github.repository }} ${{ secrets.APP_NAME }} ${{ secrets.APP_PORT }}