Skip to content

fix git action path

fix git action path #1

Workflow file for this run

name: Build Router
on:
pull_request:
branches:
- dev
paths:
- 'docs/**'
- 'src/**'
- 'blog/**'
- 'docusaurus.config.js'
- '.github/workflows/deploy.yml'
push:
branches:
- dev
paths:
- 'docs/**'
- 'src/**'
- 'blog/**'
- 'docusaurus.config.js'
- '.github/workflows/deploy.yml'
- 'static/**'
- 'sidebars.js'
env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
build:
name: Build Website
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
- name: Upload build artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v4
with:
name: github-pages
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
if: ${{ github.event_name == 'push' }}
permissions:
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: github-pages
path: build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build