Skip to content

Merge branch 'moirelog:main' into main #17

Merge branch 'moirelog:main' into main

Merge branch 'moirelog:main' into main #17

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: ["main"]
paths-ignore:
- '**.png'
- '**.jpg'
- '**.jpeg'
- '**.gif'
- '**.webp'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- name: Inject Memos from memos branch
if: github.repository == 'moirelog/moire'
run: |
git fetch origin memos
git checkout origin/memos -- src/memos || echo "Memos branch not found or empty"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4