mirror of
https://github.com/goauthentik/authentik.git
synced 2026-08-30 18:51:39 -07:00
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 6.0.9 to 6.0.10.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](0ebf47130e...0977fd9972)
---
updated-dependencies:
- dependency-name: pnpm/action-setup
dependency-version: 6.0.10
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
132 lines
4.7 KiB
YAML
132 lines
4.7 KiB
YAML
---
|
|
name: CI - API Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- next
|
|
- version-*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- version-*
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.ref }}"
|
|
cancel-in-progress: "${{ !startsWith(github.ref, 'refs/heads/version-') && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/next' }}"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
command:
|
|
- prettier-check
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
|
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
- name: Pin pnpm store directory
|
|
run: |
|
|
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
|
|
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4
|
|
with:
|
|
node-version-file: package.json
|
|
cache: pnpm
|
|
cache-dependency-path: |
|
|
pnpm-lock.yaml
|
|
website/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm --dir website install --frozen-lockfile
|
|
- name: Lint
|
|
run: pnpm --dir website run ${{ matrix.command }}
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
|
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
- name: Pin pnpm store directory
|
|
run: |
|
|
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
|
|
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4
|
|
with:
|
|
node-version-file: package.json
|
|
cache: pnpm
|
|
cache-dependency-path: |
|
|
pnpm-lock.yaml
|
|
website/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm --dir website install --frozen-lockfile
|
|
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v4
|
|
with:
|
|
path: |
|
|
${{ github.workspace }}/website/api/.docusaurus
|
|
${{ github.workspace }}/website/api/**/.cache
|
|
key: |
|
|
${{ runner.os }}-docusaurus-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-docusaurus-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
- name: Build API Docs via Docusaurus
|
|
working-directory: website
|
|
env:
|
|
NODE_ENV: production
|
|
run: pnpm run build:api
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4
|
|
with:
|
|
name: api-docs
|
|
path: website/api/build
|
|
retention-days: 7
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- lint
|
|
- build
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v5
|
|
with:
|
|
name: api-docs
|
|
path: website/api/build
|
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
- name: Pin pnpm store directory
|
|
run: |
|
|
echo "PNPM_HOME=${RUNNER_TEMP}/pnpm-home" >> "$GITHUB_ENV"
|
|
echo "npm_config_store_dir=${RUNNER_TEMP}/pnpm-home/store" >> "$GITHUB_ENV"
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v4
|
|
with:
|
|
node-version-file: package.json
|
|
cache: pnpm
|
|
cache-dependency-path: |
|
|
pnpm-lock.yaml
|
|
website/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
pnpm --dir website install --frozen-lockfile
|
|
- name: Deploy Netlify (Production)
|
|
working-directory: website/api
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
env:
|
|
NETLIFY_SITE_ID: authentik-api-docs.netlify.app
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
run: |
|
|
npx netlify deploy --no-build -d ./build --prod
|
|
- name: Deploy Netlify (Preview)
|
|
if: github.event_name == 'pull_request' || github.ref != 'refs/heads/main'
|
|
working-directory: website/api
|
|
env:
|
|
NETLIFY_SITE_ID: authentik-api-docs.netlify.app
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
run: |
|
|
if [ -n "${NETLIFY_AUTH_TOKEN}" ]; then
|
|
npx netlify deploy --no-build -d ./build --alias=deploy-preview-${{ github.event.number }}
|
|
fi
|