mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
* feat: Create .well-known/security.txt * feat: Add another security.txt for the main website * fix: deploy hidden files --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
name: Docs build
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
release:
|
|
types: [published]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
pre-job:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
should_run: ${{ steps.found_paths.outputs.docs == 'true' || steps.should_force.outputs.should_force == 'true' }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
with:
|
|
persist-credentials: false
|
|
- id: found_paths
|
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
|
with:
|
|
filters: |
|
|
docs:
|
|
- 'docs/**'
|
|
workflow:
|
|
- '.github/workflows/docs-build.yml'
|
|
- name: Check if we should force jobs to run
|
|
id: should_force
|
|
run: echo "should_force=${{ steps.found_paths.outputs.workflow == 'true' || github.event_name == 'release' || github.ref_name == 'main' }}" >> "$GITHUB_OUTPUT"
|
|
|
|
build:
|
|
name: Docs Build
|
|
needs: pre-job
|
|
permissions:
|
|
contents: read
|
|
if: ${{ needs.pre-job.outputs.should_run == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./docs
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
with:
|
|
node-version-file: './docs/.nvmrc'
|
|
|
|
- name: Run npm install
|
|
run: npm ci
|
|
|
|
- name: Check formatting
|
|
run: npm run format
|
|
|
|
- name: Run build
|
|
run: npm run build
|
|
|
|
- name: Upload build output
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
with:
|
|
name: docs-build-output
|
|
path: docs/build/
|
|
include-hidden-files: true
|
|
retention-days: 1
|