Skip to content

Docs Build & Publish #266

Docs Build & Publish

Docs Build & Publish #266

Workflow file for this run

name: Docs Build & Publish
on:
push:
branches:
- main
schedule:
- cron: "38 14 * * *" # Every day at 14:38 (UTC)
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Checkout fivenet repository
uses: actions/checkout@v4
with:
repository: fivenet-app/fivenet
fetch-depth: 0
path: fivenet
- name: Set latest version for docs
shell: bash
run: |
echo "COMMIT_REF=$(git -C ./fivenet describe --tags --exclude='fivenet-*')" >> $GITHUB_ENV
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Get JS dependencies
run: pnpm install
- name: Build site
env:
NUXT_PUBLIC_SITE_URL: "https://fivenet.app/"
NUXT_UI_PRO_LICENSE: "${{ secrets.NUXT_UI_PRO_LICENSE }}"
NUXT_PUBLIC_STUDIO_TOKENS: "${{ secrets.NUXT_PUBLIC_STUDIO_TOKENS }}"
run: |
pnpm generate
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.output/public/
cname: fivenet.app