Skip to content

ci(deploy): change deploy to github pages config (#10) #2

ci(deploy): change deploy to github pages config (#10)

ci(deploy): change deploy to github pages config (#10) #2

Workflow file for this run

name: Deploy Next.js static site to GitHub Pages
on:
push:
branches:
- 'main'
tags:
- '**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build
deploy:
# Add a dependency to the build job
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action