From 907fcdff9160f3bd4c9605979801a97ef9ec5f16 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Mon, 30 Oct 2023 13:30:34 +0000 Subject: [PATCH] Add automated publishing --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1fc218c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build/release + +on: [push] + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v3 + with: + node-version: 18 + + - run: yarn + - run: yarn build + + - name: Archive + run: tar -czvf upload.tar.gz -C ./dist . + + - name: Release + run: 'curl -X POST -H "Authorization: Bearer ${{ secrets.DEPLOY }}" -F "upload=@upload.tar.gz" "https://sites.1f349.net/u?site=mail.1f349.net&branch=${{ github.ref_name }}"'