Skip to content

Auto Deploy

Auto Deploy #76

Workflow file for this run

name: Auto Deploy
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 */5 * *'
jobs:
deploy:
if: ${{ github.repository_owner == 'plainheart' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Cache node modules
id: cache
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build Offline Documentation
run: npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
clean: true