Skip to content

Lfop 61

Lfop 61 #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install bun
uses: oven-sh/setup-bun@v2
- name: Cache bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
restore-keys: |
bun-${{ runner.os }}-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache Next.js build
uses: actions/cache@v5
with:
path: |
apps/landing/.next/cache
key: nextjs-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-${{ hashFiles('apps/landing/**/*.{js,jsx,ts,tsx,md,mdx}') }}
restore-keys: |
nextjs-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}-
- name: Install dependencies
run: bun install
- name: Build landing
run: bun run --filter landing build
- name: Disable Jekyll
run: touch apps/landing/out/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./apps/landing/out
deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4