From c0027f2901c725b20bccf0fe62f668094e4a201d Mon Sep 17 00:00:00 2001 From: patrick-zippenfenig Date: Thu, 4 Jan 2024 12:07:10 +0100 Subject: [PATCH] add action to deploy to staging manually --- .github/workflows/build_staging.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/build_staging.yml diff --git a/.github/workflows/build_staging.yml b/.github/workflows/build_staging.yml new file mode 100644 index 00000000..a05f8299 --- /dev/null +++ b/.github/workflows/build_staging.yml @@ -0,0 +1,22 @@ +name: Build And Stage + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - run: npm ci + - run: npm run staging + - run: npm run rename_index_files + - name: Install LFTP + run: sudo apt update && sudo apt -qq -y install lftp + - name: Upload ftp + run: lftp storage.bunnycdn.com -u open-meteo-staging,${{ secrets.ftp_password_staging }} -e "set ftp:ssl-force false; set ssl:verify-certificate false; mirror --reverse --continue --dereference -x ^\.git/$ build .; quit" + - run: "curl --request POST --url https://api.bunny.net/pullzone/277769/purgeCache --header 'AccessKey: ${{ secrets.bunny_api_key }}' --header 'content-type: application/json'"