From c98206045e55f9c6e28fa33d00241bb8a5f8f1fc Mon Sep 17 00:00:00 2001 From: sigmasternchen Date: Fri, 13 Dec 2024 12:23:56 +0100 Subject: [PATCH] chore: Add deploy workflow --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 23 ----------------------- 2 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a7cbae3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Beam + uses: erlef/setup-beam@v1 + with: + otp-version: "26.0.2" + gleam-version: "1.5.1" + rebar3-version: "3" + # elixir-version: "1.15.4" + - name: Install dependencies + run: | + gleam deps download + gleam run -m esgleam/install + - name: Build + run: | + gleam build + gleam run -m build + - name: Deploy to BunnyCDN + uses: ayeressian/bunnycdn-storage-deploy@v2.2.3 + with: + source: "./dist" + destination: "/" + upload: "true" + remove: "true" + storageZoneName: ${{ secrets.BUNNYCDN_STORAGE_ZONE }} + storagePassword: ${{ secrets.BUNNYCDN_STORAGE_KEY }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index be97e7a..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: test - -on: - push: - branches: - - master - - main - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: erlef/setup-beam@v1 - with: - otp-version: "26.0.2" - gleam-version: "1.5.1" - rebar3-version: "3" - # elixir-version: "1.15.4" - - run: gleam deps download - - run: gleam test - - run: gleam format --check src test