Skip to content

Commit

Permalink
ci: added deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgeiler committed Apr 20, 2024
1 parent ccb5056 commit 36f9131
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup PNPM
- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0

- name: Setup Node.js
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy

on:
push:
branches:
- main
- 'renovate/**'
paths-ignore:
- '**.md'
- .gitignore
- 'assets/**'
- '.github/**'
- '!.github/workflows/deploy.yml'

workflow_dispatch:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0

- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18
cache: pnpm

- name: Configure GitHub Pages
uses: actions/[email protected]
with:
static_site_generator: sveltekit

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: dist

- name: Deploy GitHub Pages site
id: deployment
uses: actions/[email protected]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

0 comments on commit 36f9131

Please sign in to comment.