From 665fc293b5b43e57481f0e92bbc054c341a7148e Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 10 Dec 2024 10:07:23 +0000 Subject: [PATCH 1/4] Use rsync --- .forgejo/workflows/production.yml | 2 +- .forgejo/workflows/stage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/production.yml b/.forgejo/workflows/production.yml index fa080ee..922968c 100644 --- a/.forgejo/workflows/production.yml +++ b/.forgejo/workflows/production.yml @@ -22,7 +22,7 @@ jobs: - run: yarn test - name: "Copy files over to location" - run: cp -r . ${{ secrets.PROD_REPO_PATH }} + run: rsync -r . ${{ secrets.PROD_REPO_PATH }} deploy: environment: prod diff --git a/.forgejo/workflows/stage.yml b/.forgejo/workflows/stage.yml index e8157b8..34af3a2 100644 --- a/.forgejo/workflows/stage.yml +++ b/.forgejo/workflows/stage.yml @@ -22,7 +22,7 @@ jobs: - run: yarn test - name: "Copy files over to location" - run: cp -r . ${{ secrets.STAGE_REPO_PATH }} + run: rsync -r . ${{ secrets.STAGE_REPO_PATH }} deploy: environment: prod From 0cc43567931e7a947c3a6afb1c47707b1060ed06 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 10 Dec 2024 10:10:13 +0000 Subject: [PATCH 2/4] Use rsync -rvzP --- .forgejo/workflows/production.yml | 2 +- .forgejo/workflows/stage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/production.yml b/.forgejo/workflows/production.yml index 922968c..584bd56 100644 --- a/.forgejo/workflows/production.yml +++ b/.forgejo/workflows/production.yml @@ -22,7 +22,7 @@ jobs: - run: yarn test - name: "Copy files over to location" - run: rsync -r . ${{ secrets.PROD_REPO_PATH }} + run: rsync -rvzP . ${{ secrets.PROD_REPO_PATH }} deploy: environment: prod diff --git a/.forgejo/workflows/stage.yml b/.forgejo/workflows/stage.yml index 34af3a2..fbf46d6 100644 --- a/.forgejo/workflows/stage.yml +++ b/.forgejo/workflows/stage.yml @@ -22,7 +22,7 @@ jobs: - run: yarn test - name: "Copy files over to location" - run: rsync -r . ${{ secrets.STAGE_REPO_PATH }} + run: rsync -rvzP . ${{ secrets.STAGE_REPO_PATH }} deploy: environment: prod From 725f3ee869499b6ed667531f1d70be35de75d1b5 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 10 Dec 2024 10:19:40 +0000 Subject: [PATCH 3/4] Use password secret --- .forgejo/workflows/production.yml | 2 +- .forgejo/workflows/stage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/production.yml b/.forgejo/workflows/production.yml index 584bd56..6ccad47 100644 --- a/.forgejo/workflows/production.yml +++ b/.forgejo/workflows/production.yml @@ -52,7 +52,7 @@ jobs: with: host: ${{ secrets.PROD_SSH_HOST }} username: ${{ secrets.PROD_SSH_USER }} - key: ${{ secrets.PROD_SSH_KEY }} + password: ${{ secrets.PROD_SSH_PASS }} port: ${{ secrets.PROD_SSH_PORT }} envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,CACHE_INTERVAL script: | diff --git a/.forgejo/workflows/stage.yml b/.forgejo/workflows/stage.yml index fbf46d6..e14da4e 100644 --- a/.forgejo/workflows/stage.yml +++ b/.forgejo/workflows/stage.yml @@ -52,7 +52,7 @@ jobs: with: host: ${{ secrets.STAGE_SSH_HOST }} username: ${{ secrets.STAGE_SSH_USER }} - key: ${{ secrets.STAGE_SSH_KEY }} + password: ${{ secrets.STAGE_SSH_PASS }} port: ${{ secrets.STAGE_SSH_PORT }} envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,CACHE_INTERVAL script: | From e081ff78028beb53bea297926a686e04dd132193 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Tue, 10 Dec 2024 10:21:03 +0000 Subject: [PATCH 4/4] Revert "Use password secret" This reverts commit 725f3ee869499b6ed667531f1d70be35de75d1b5. --- .forgejo/workflows/production.yml | 2 +- .forgejo/workflows/stage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/production.yml b/.forgejo/workflows/production.yml index 6ccad47..584bd56 100644 --- a/.forgejo/workflows/production.yml +++ b/.forgejo/workflows/production.yml @@ -52,7 +52,7 @@ jobs: with: host: ${{ secrets.PROD_SSH_HOST }} username: ${{ secrets.PROD_SSH_USER }} - password: ${{ secrets.PROD_SSH_PASS }} + key: ${{ secrets.PROD_SSH_KEY }} port: ${{ secrets.PROD_SSH_PORT }} envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,CACHE_INTERVAL script: | diff --git a/.forgejo/workflows/stage.yml b/.forgejo/workflows/stage.yml index e14da4e..fbf46d6 100644 --- a/.forgejo/workflows/stage.yml +++ b/.forgejo/workflows/stage.yml @@ -52,7 +52,7 @@ jobs: with: host: ${{ secrets.STAGE_SSH_HOST }} username: ${{ secrets.STAGE_SSH_USER }} - password: ${{ secrets.STAGE_SSH_PASS }} + key: ${{ secrets.STAGE_SSH_KEY }} port: ${{ secrets.STAGE_SSH_PORT }} envs: DB_NAME,DB_AUTH_USER,DB_AUTH_PASS,DB_HOST,DB_PORT,DB_ROOT_HOST,DB_SYNC,DB_LOGGING,DB_DATA_LOCATION,BOT_TOKEN,BOT_VER,BOT_AUTHOR,BOT_OWNERID,BOT_CLIENTID,ABOUT_FUNDING,ABOUT_REPO,CACHE_INTERVAL script: |