From 2832db0275dc0f256fe1678b3028dd025c4eee75 Mon Sep 17 00:00:00 2001 From: Andreas Philippi <18646892+andreasphil@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:21:34 +0100 Subject: [PATCH] ci: configure deployment to GitHub Pages --- .github/workflows/pipeline.yml | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..ef50ca8 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,54 @@ +name: Pipeline + +on: + push: + branches: ["main"] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + cache: "pnpm" + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Test + run: pnpm test + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + cache: "pnpm" + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Build + run: pnpm build + - name: Setup GitHub Pages + uses: actions/configure-pages@v5 + - name: Upload + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + deploy: + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4