diff --git a/.github/workflows/liara.yaml b/.github/workflows/liara.yaml new file mode 100644 index 00000000..ba7f16c2 --- /dev/null +++ b/.github/workflows/liara.yaml @@ -0,0 +1,24 @@ +name: CD-Liara +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "18" + - name: update-liara + env: + LIARA_TOKEN: ${{ secrets.LIARA_API_TOKEN }} + LIARA_BACKEND_APP_NAME: ${{secrets.LIARA_BACKEND_APP_NAME}} + LIARA_FRONTEND_APP_NAME: ${{secrets.LIARA_FRONTEND_APP_NAME}} + run: | + npm i -g @liara/cli@5 + cd backend && liara deploy --port="80" --app="$LIARA_BACKEND_APP_NAME" --api-token="$LIARA_TOKEN" --detach + cd ../frontend && liara deploy --port="3000" --app="$LIARA_FRONTEND_APP_NAME" --api-token="$LIARA_TOKEN" --detach +