Skip to content

WIP react-nextjs.html #12

WIP react-nextjs.html

WIP react-nextjs.html #12

# This is a basic workflow to help you get started with Actions
name: Deploy static content to GitHub Pages
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ['main']
pull_request:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Set GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4
# Install and run Bun in GitHub Actions https://bun.sh/guides/runtime/cicd
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies and build
run: |
bun install
bun run build
# A GitHub Action to enable Pages and extract various metadata about a site https://github.com/actions/configure-pages
- name: Setup Pages
uses: actions/configure-pages@v5
# A composite Action for packaging and uploading artifact that can be deployed to GitHub Pages https://github.com/actions/upload-pages-artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload folder
path: './dist'
# Deploy Actions artifacts to GitHub Pages.
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4