mirror of
https://github.com/nh-server/switch-guide.git
synced 2026-08-15 20:19:49 -07:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Deploy site
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
submodules: recursive
|
|
|
|
- name: Configure GitHub Pages
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build site
|
|
run: npm run docs:build
|
|
|
|
- name: Post-Mkdocs touch/copy files
|
|
# miscellaneous files needed for GitHub etc
|
|
run: |
|
|
touch docs/.vitepress/dist/.nojekyll
|
|
cp CNAME docs/.vitepress/dist/CNAME
|
|
|
|
- name: Deploy 🚀
|
|
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
|
with:
|
|
branch: gh-pages # The branch the action should deploy to.
|
|
folder: docs/.vitepress/dist # The folder the action should deploy.
|
|
clean: true # Automatically remove deleted files from the deploy branch
|