mirror of
https://github.com/goauthentik/authentik
synced 2026-04-25 17:15:26 +02:00
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](8b402f58fb...cdf6c1fa76)
---
updated-dependencies:
- dependency-name: actions/cache
dependency-version: 5.0.3
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>
96 lines
3.1 KiB
YAML
96 lines
3.1 KiB
YAML
---
|
|
name: CI - API Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- next
|
|
- version-*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- version-*
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
command:
|
|
- prettier-check
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
|
|
- name: Install Dependencies
|
|
working-directory: website/
|
|
run: npm ci
|
|
- name: Lint
|
|
working-directory: website/
|
|
run: npm run ${{ matrix.command }}
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v5
|
|
with:
|
|
node-version-file: website/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: website/package-lock.json
|
|
- working-directory: website/
|
|
name: Install Dependencies
|
|
run: npm ci
|
|
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4
|
|
with:
|
|
path: |
|
|
${{ github.workspace }}/website/api/.docusaurus
|
|
${{ github.workspace }}/website/api/**/.cache
|
|
key: |
|
|
${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}
|
|
- name: Build API Docs via Docusaurus
|
|
working-directory: website
|
|
env:
|
|
NODE_ENV: production
|
|
run: npm run build -w api
|
|
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4
|
|
with:
|
|
name: api-docs
|
|
path: website/api/build
|
|
retention-days: 7
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- lint
|
|
- build
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
|
|
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v5
|
|
with:
|
|
name: api-docs
|
|
path: website/api/build
|
|
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v5
|
|
with:
|
|
node-version-file: website/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: website/package-lock.json
|
|
- 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 --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 "${VAR}" ]; then
|
|
npx netlify deploy --no-build --alias=deploy-preview-${{ github.event.number }}
|
|
fi
|