Skip to content

revise: various changes to front page #17

revise: various changes to front page

revise: various changes to front page #17

name: Deploy a Preview Site
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "latest"
- run: npm install -g pnpm
- run: pnpm install
- run: sed -i "s|baseURL: \"/\"|baseURL: \"/docs/branches/${GITHUB_HEAD_REF}\"|g" nuxt.config.ts

Check failure on line 18 in .github/workflows/deploy-preview.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-preview.yml

Invalid workflow file

You have an error in your yaml syntax on line 18
- run: pnpm nuxt build --preset github_pages
- run: |
mkdir -p dist/branches/${{ github.head_ref }}
mv .output/public/* dist/branches/${{ github.head_ref }} || exit 0
- uses: actions/upload-pages-artifact@v3
with:
name: "Project Documentation"
path: "dist"
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: "Project Documentation"