From 1f893be7f23e003d0dbd2c2864d3183d18d9cf8a Mon Sep 17 00:00:00 2001 From: Steven Eardley Date: Tue, 15 Oct 2024 10:34:49 +0100 Subject: [PATCH 1/3] Add CI to master for production updates --- .github/workflows/{main.yml => dev.yml} | 0 .github/workflows/prod.yml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) rename .github/workflows/{main.yml => dev.yml} (100%) create mode 100644 .github/workflows/prod.yml diff --git a/.github/workflows/main.yml b/.github/workflows/dev.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/dev.yml diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 00000000..464ce741 --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,19 @@ +on: + push: + branches: + - master + +jobs: + deploy_prod: + name: Pull latest master and redeploy prod instance + runs-on: ubuntu-latest + + steps: + - name: SSH live pull and build (same machine so correct host is dev.) + uses: D3rHase/ssh-command-action@v0.2.2 + with: + host: dev.openaccessbutton.org + user: ${{secrets.USER_TEST_V1}} + private_key: ${{secrets.GA_ED25519}} + host_fingerprint: ${{secrets.FINGERPRINT_TEST_V1}} + command: cd ~/live/oaworks/embed && git pull && cd ~/live/openresearchbutton/website && git pull && npm install && node build.js && sudo nginx -s reload From b8116a9d5f77454404c172586e8b953695b5d58e Mon Sep 17 00:00:00 2001 From: Mark MacGillivray Date: Fri, 29 Nov 2024 06:59:15 +0000 Subject: [PATCH 2/3] alter syp setup --- content/shareyourpaper/setup.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/shareyourpaper/setup.html b/content/shareyourpaper/setup.html index 7b0de091..d2c7950c 100644 --- a/content/shareyourpaper/setup.html +++ b/content/shareyourpaper/setup.html @@ -697,8 +697,10 @@

OAB Only TODO is this still needed

}); var deposits = function(e) { - var addr = api + '/' + ($(this).attr('id') === 'all_file_deposits' ? 'deposited' : 'deposits') + '.csv?uid=' + noddy.user.account._id; - if ($('#depositdate').val()) addr += '&q=deposit.createdAt:>' + new Date($('#depositdate').datepicker('getDate')).valueOf(); + var addr = api + '/deposited.csv?' + if (noddy.user !== undefined && noddy.user.account !== undefined && noddy.user.account._id !== undefined) addr += 'uid=' + noddy.user.account._id + '&'; + if ($(this).attr('id') === 'all_file_deposits') addr += 'submitted=true&'; + if ($('#depositdate').val()) addr += 'fromdate=' + new Date($('#depositdate').datepicker('getDate')).valueOf() + '&'; $(this).attr('href',addr); } $('body').on('click','#all_deposits',deposits); From 3d536f848a51205f0e2ebb1d4792028d7b12a6bf Mon Sep 17 00:00:00 2001 From: Mark MacGillivray Date: Tue, 10 Dec 2024 06:35:16 +0000 Subject: [PATCH 3/3] add a static file called triggers.md to add lines to whenever want to trigger deployments of website and embed, in fastest easiest way possible on old and unmaintained codebase until we eventually shut it down... --- static/triggers.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/triggers.md diff --git a/static/triggers.md b/static/triggers.md new file mode 100644 index 00000000..c8c98cdf --- /dev/null +++ b/static/triggers.md @@ -0,0 +1 @@ +I trigger deployments... \ No newline at end of file