Skip to content

build public

build public #5

Workflow file for this run

name: build public
on:
workflow_dispatch:
repository_dispatch:
types:
- public-build
permissions:
contents: write
jobs:
build_public:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
token: ${{ secrets.DEPLOY_SECRET }}
# fetch-depth: '0'
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
- name: Cache NPM dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: |
${{ runner.OS }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
branch: main
folder: dist
repository-name: yy4382/blog-public
token: ${{ secrets.DEPLOY_SECRET }}