Skip to content

publish-github.io #2475

publish-github.io

publish-github.io #2475

name: publish-github.io
on:
schedule:
- cron: '30 10,14,20 * * *'
workflow_dispatch:
push:
permissions:
contents: read
pages: write
id-token: write
jobs:
render:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: build
run: |
cd ${{ github.workspace }}
npm install
node .script/sync-doc.js
npm run build
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.0
with:
path: 'build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5