Skip to content

Deploy to GitHub Pages #816

Deploy to GitHub Pages

Deploy to GitHub Pages #816

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: 蹦蹦
workflow_dispatch:
schedule:
- cron: '0 0 */1 * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- name: Install npm packages
run: npm ci
- name: Generate Pages
run: npm run generate
- name: Fixed index.html
run: |
cp ./dist/200.html ./dist/404.html
- name: Generate Preview
run: node generateCoursePreview.mjs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
force_orphan: true
cname: ntut-course.gnehs.net