From 8e70e5a7445e1bfd8bbd95bd63e85089a51abc8d Mon Sep 17 00:00:00 2001
From: Cogent Apps <cogentapps@fastmail.com>
Date: Sat, 18 Mar 2023 09:50:05 +0000
Subject: [PATCH] new deploy action

---
 .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 .github/workflows/deploy.yml

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..701c7aa
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,28 @@
+name: deploy hosted site
+
+on:
+  push:
+    branches:
+      - release
+
+jobs:
+  deploy-webapp:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v3
+
+    - run: cd app && npm install && npm run build
+      env:
+        REACT_APP_AUTH_PROVIDER: auth0
+        REACT_APP_SHARE_URL: ${{ secrets.SHARE_URL }}
+
+    - name: Push directory to another repository
+      uses: cpina/github-action-push-to-another-repository@v1.6
+      env:
+        API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
+      with:
+        source-directory: 'app/build'
+        destination-github-username: ${{ github.repository_owner }}
+        destination-repository-name: chat-with-gpt-public
+        target-branch: main
\ No newline at end of file