From 19bda99c862a848e506f924f38964337a24629af 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 | 63 ++++++++++++++++++++++++++++++++++ 1 file changed, 63 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..6e4c0ac --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,63 @@ +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: | + corepack enable + corepack install + 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: | + corepack enable + corepack install + 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 + needs: + - test + - build + 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