Skip to content

chore: deploy config permissions #4

chore: deploy config permissions

chore: deploy config permissions #4

Workflow file for this run

name: Deploy Next.js to GitHub Pages
on:
push:
branches:
- main # Trigger the workflow every time you push to the `main` branch
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build and deploy:

Check failure on line 15 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy Next.js to GitHub Pages

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 15, Col: 3): The identifier 'build and deploy' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # 根据需要设置 Node.js 版本
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Build and export
run: pnpm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out