feat: add optional debug logging #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
env: | |
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
DATABASE_ID: ${{ secrets.DATABASE_ID }} | |
WEBSITE_TAG: ${{ secrets.WEBSITE_TAG }} | |
run: bun install | |
- name: Build the project | |
env: | |
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
DATABASE_ID: ${{ secrets.DATABASE_ID }} | |
WEBSITE_TAG: ${{ secrets.WEBSITE_TAG }} | |
BASE_URL: /${{ github.event.repository.name }} | |
run: bun run build | |
- name: List build directory contents | |
run: ls -R ./dist | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
publish_branch: gh-pages |