v1.0.2 - update
This commit is contained in:
22
.github/workflows/deploy-github-pages.yml
vendored
22
.github/workflows/deploy-github-pages.yml
vendored
@@ -1,8 +1,13 @@
|
|||||||
name: Deploy GitHub Pages
|
name: Deploy GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
watch:
|
workflow_dispatch:
|
||||||
types: [started]
|
inputs:
|
||||||
|
deploy_message:
|
||||||
|
description: 'Deployment message'
|
||||||
|
required: false
|
||||||
|
default: 'Manual deployment'
|
||||||
|
type: string
|
||||||
|
|
||||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
permissions:
|
permissions:
|
||||||
@@ -20,11 +25,22 @@ jobs:
|
|||||||
# Build job
|
# Build job
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.repository.owner.id == github.event.sender.id
|
# 权限控制:只允许特定用户或仓库所有者触发
|
||||||
|
if: github.actor == github.repository_owner || github.actor == 'nelson820125' || contains(fromJson('["nelson820125", "other-user"]'), github.actor)
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check permissions
|
||||||
|
run: |
|
||||||
|
echo "Triggered by: ${{ github.actor }}"
|
||||||
|
echo "Repository owner: ${{ github.repository_owner }}"
|
||||||
|
echo "Event name: ${{ github.event_name }}"
|
||||||
|
|
||||||
|
- name: Show deployment message
|
||||||
|
run: |
|
||||||
|
echo "Deployment message: ${{ github.event.inputs.deploy_message || 'Manual deployment' }}"
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user