mirror of
https://github.com/andrewgioia/keyrune.git
synced 2025-12-15 16:20:44 +00:00
56 lines
1.0 KiB
YAML
56 lines
1.0 KiB
YAML
name: Deploy Docs (Production)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages-production
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Build docs
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build docs site
|
|
run: npm run publish
|
|
|
|
# upload the built docs as the GitHub Pages artifact
|
|
- name: Upload artifact for GitHub Pages
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: ./docs
|
|
|
|
deploy:
|
|
name: Deploy to GitHub Pages
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
- name: Deploy
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|