Skip to content

Merge pull request #28 from ZhaoWeicheng98/dependabot/npm_and_yarn/te… #25

Merge pull request #28 from ZhaoWeicheng98/dependabot/npm_and_yarn/te…

Merge pull request #28 from ZhaoWeicheng98/dependabot/npm_and_yarn/te… #25

Workflow file for this run

name: Build And Deploy To Github Pages
# workflow的触发事件,这里代表main分支的push事件触发
on:
push:
branches: [ master ]
# 任务
jobs:
# build-and-deploy 为任务的ID
build-and-deploy:
# 运行所需要的环境
runs-on: ubuntu-latest
steps:
# 步骤名
- name: Checkout
# 使用的actions脚本,这里是官方提供的获取源码脚本
uses: actions/[email protected]
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git-user-signingkey: true
git-commit-gpgsign: true
# 执行npm脚本打包项目
- name: Install and Build
run: |
npm install
npm run build
# Runs a set of commands using the runners shell
- name: GitHub Pages
# You may pin to the exact commit or the version.
# uses: crazy-max/ghaction-github-pages@1510b11c0c2f843eafb8ff41b3da8c467c8d4a9f
uses: crazy-max/[email protected]
with:
# GitHub repository where assets will be deployed (default current)
repo: cnfurikana/cnfurikana.github.io # optional
# Git branch where assets will be deployed
target_branch: main # optional, default is gh-pages
# Build directory to deploy
build_dir: dist/
# Allow Jekyll to build your site
jekyll: false # optional, default is true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}