mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-06-09 18:40:59 +01:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Build documentation site to nist-pages
|
|
|
|
on:
|
|
push:
|
|
branches: ["nist-pages-docs"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
BUILD_PATH: "."
|
|
SITE_PATH: "https://pages.nist.gov/"
|
|
BASE_PATH: "/macos_security"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
cache: pnpm
|
|
cache-dependency-path: ${{ env.BUILD_PATH }}/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: ${{ env.BUILD_PATH }}
|
|
- name: Build with Astro
|
|
run: |
|
|
pnpm astro build \
|
|
--site "${{ env.SITE_PATH }}" \
|
|
--base "${{ env.BASE_PATH }}"
|
|
working-directory: ${{ env.BUILD_PATH }}
|
|
- name: Upload to nist-pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ${{ env.BUILD_PATH }}/dist
|
|
publish_branch: nist-pages
|