Deploy to GitHub Pages #816
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |