Skip to content

Commit

Permalink
ci: configure deployment to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasphil committed Dec 14, 2024
1 parent c865228 commit 19bda99
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 19bda99

Please sign in to comment.