Skip to content

Commit bf0235c

Browse files
ci: add NPM packages publish (#13974)
Co-authored-by: Teffen Ellis <[email protected]>
1 parent 895cd23 commit bf0235c

36 files changed

+26659
-20
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: authentik-packages-npm-publish
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- packages/docusaurus-config
7+
- packages/eslint-config
8+
- packages/prettier-config
9+
- packages/tsconfig
10+
workflow_dispatch:
11+
jobs:
12+
publish:
13+
if: ${{ github.repository != 'goauthentik/authentik-internal' }}
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
package:
19+
- docusaurus-config
20+
- eslint-config
21+
- prettier-config
22+
- tsconfig
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 2
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version-file: packages/${{ matrix.package }}/package.json
30+
registry-url: "https://registry.npmjs.org"
31+
- name: Get changed files
32+
id: changed-files
33+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
34+
with:
35+
files: |
36+
packages/${{ matrix.package }}/package.json
37+
- name: Publish package
38+
if: steps.changed-files.outputs.any_changed == 'true'
39+
working-directory: packages/${{ matrix.package}}
40+
run: |
41+
npm ci
42+
npm run build
43+
npm publish
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ local_settings.py
1111
db.sqlite3
1212
media
1313

14+
# Node
15+
16+
node_modules
17+
1418
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
1519
# in your Git repository. Update and uncomment the following line accordingly.
1620
# <django-project-name>/staticfiles/

.prettierignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Prettier Ignorefile
2+
3+
## Static Files
4+
**/LICENSE
5+
6+
authentik/stages/**/*
7+
8+
## Build asset directories
9+
coverage
10+
dist
11+
out
12+
.docusaurus
13+
website/docs/developer-docs/api/**/*
14+
15+
## Environment
16+
*.env
17+
18+
## Secrets
19+
*.secrets
20+
21+
## Yarn
22+
.yarn/**/*
23+
24+
## Node
25+
node_modules
26+
coverage
27+
28+
## Configs
29+
*.log
30+
*.yaml
31+
*.yml
32+
33+
# Templates
34+
# TODO: Rename affected files to *.template.* or similar.
35+
*.html
36+
*.mdx
37+
*.md
38+
39+
## Import order matters
40+
poly.ts
41+
src/locale-codes.ts
42+
src/locales/
43+
44+
# Storybook
45+
storybook-static/
46+
.storybook/css-import-maps*
47+

packages/.gitignore

Whitespace-only changes.

packages/docusaurus-config/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.anchor > .badge {
2+
font-size: 0.75rem;
3+
vertical-align: middle;
4+
}
5+
6+
.anchor > .badge {
7+
margin-left: 0.5rem;
8+
}
9+
10+
.badge {
11+
--ifm-font-weight-bold: 900;
12+
}
13+
14+
.badge--support-vendor {
15+
--ifm-badge-background-color: var(--ifm-color-warning-contrast-background);
16+
--ifm-badge-color: var(--ifm-color-warning-contrast-foreground);
17+
--ifm-badge-border-color: var(--ifm-color-warning-contrast-foreground);
18+
}
19+
20+
.badge--support-community {
21+
--ifm-badge-background-color: var(
22+
--ifm-color-secondary-contrast-foreground
23+
);
24+
--ifm-badge-border-color: var(--ifm-color-secondary-dark);
25+
--ifm-badge-color: var(--ifm-color-secondary-contrast-background);
26+
}
27+
28+
.badge--support-deprecated {
29+
--ifm-badge-background-color: var(--ifm-color-danger);
30+
--ifm-badge-border-color: var(--ifm-color-danger-contrast-background);
31+
--ifm-badge-color: var(--ifm-color-danger-contrast-foreground);
32+
}
33+
34+
.badge--support-authentik {
35+
--ifm-badge-background-color: var(--ifm-color-primary);
36+
--ifm-badge-border-color: var(--ifm-color-secondary);
37+
--ifm-badge-color: var(--ifm-color-secondary);
38+
}
39+
40+
.badge--version {
41+
--ifm-badge-background-color: var(--ifm-color-primary-contrast-background);
42+
--ifm-badge-border-color: var(--ifm-color-primary-contrast-foreground);
43+
--ifm-badge-color: var(--ifm-color-primary-contrast-foreground);
44+
}
45+
46+
.badge--preview {
47+
--ifm-badge-background-color: rgb(115, 188, 247);
48+
--ifm-badge-border-color: var(--ifm-badge-background-color);
49+
--ifm-badge-color: var(--ifm-color-primary-contrast-foreground);
50+
}
51+
52+
.badge-group {
53+
display: flex;
54+
flex-wrap: wrap;
55+
gap: 1rem;
56+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:root {
2+
--ifm-button-color: var(--white);
3+
}
4+
5+
.button-row {
6+
gap: var(--ifm-global-spacing);
7+
display: flex;
8+
align-items: center;
9+
justify-content: center;
10+
align-items: center;
11+
flex-wrap: wrap;
12+
}
13+
14+
.button--outline {
15+
--ifm-button-color: var(--white);
16+
--ifm-button-border-color: var(--white);
17+
18+
&:hover {
19+
--ifm-button-color: var(--ifm-color-primary);
20+
}
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:root {
2+
--docusaurus-highlighted-code-line-bg: #efefef;
3+
}
4+
5+
html[data-theme="dark"] {
6+
/* Color which works with dark mode syntax highlighting theme */
7+
--docusaurus-highlighted-code-line-bg: #3f3f3f;
8+
}
9+
10+
.theme-code-block pre code {
11+
font-weight: 500;
12+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
:root {
2+
--ifm-font-family-base:
3+
RedHatVF, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
4+
Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
5+
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
6+
7+
--ifm-font-family-monospace:
8+
RedHatMonoVF, SFMono-Regular, Menlo, Monaco, Consolas,
9+
"Liberation Mono", "Courier New", monospace;
10+
11+
--ifm-heading-font-family: RedHatDisplayVF, var(--ifm-font-family-base);
12+
13+
--ifm-h5-font-size: 0.88rem;
14+
--ifm-code-font-size: 100%;
15+
}
16+
17+
@font-face {
18+
font-family: "RedHatDisplayVF";
19+
font-style: normal;
20+
font-weight: 300 900;
21+
font-display: fallback;
22+
src:
23+
local("Red Hat Display"),
24+
url("/fonts/RedHatFont-updated/modified/RedHatDisplayVFModified-updated.woff2")
25+
format("woff2-variations"),
26+
url("https://goauthentik.io/fonts/RedHatFont-updated/modified/RedHatDisplayVFModified-updated.woff2")
27+
format("woff2-variations");
28+
}
29+
30+
@font-face {
31+
font-family: "RedHatDisplayVF";
32+
font-style: italic;
33+
font-weight: 300 900;
34+
font-display: fallback;
35+
src:
36+
local("Red Hat Display"),
37+
url("/fonts/RedHatFont-updated/modified/RedHatDisplayVF-updated-ItalicModified.woff2")
38+
format("woff2-variations"),
39+
url("https://goauthentik.io/fonts/RedHatFont-updated/modified/RedHatDisplayVF-updated-ItalicModified.woff2")
40+
format("woff2-variations");
41+
}
42+
43+
@font-face {
44+
font-family: "RedHatTextVF";
45+
font-style: normal;
46+
font-weight: 400 500;
47+
font-display: fallback;
48+
src:
49+
local("Red Hat Display"),
50+
url("/fonts/RedHatFont-updated/modified/RedHatTextVFModified-updated.woff2")
51+
format("woff2-variations"),
52+
url("https://goauthentik.io/fonts/RedHatFont-updated/modified/RedHatTextVFModified-updated.woff2")
53+
format("woff2-variations");
54+
}
55+
56+
@font-face {
57+
font-family: "RedHatTextVF";
58+
font-style: italic;
59+
font-weight: 400 500;
60+
font-display: fallback;
61+
src:
62+
local("Red Hat Display"),
63+
url("/fonts/RedHatFont-updated/modified/RedHatTextVF-updated-ItalicModified.woff2")
64+
format("woff2-variations")
65+
url("https://goauthentik.io/fonts/RedHatFont-updated/modified/RedHatTextVF-updated-ItalicModified.woff2")
66+
format("woff2-variations");
67+
}
68+
69+
@font-face {
70+
font-family: "RedHatMonoVF";
71+
font-style: normal;
72+
font-weight: 300 700;
73+
font-display: fallback;
74+
src:
75+
local("Red Hat Mono"),
76+
url("/fonts/RedHatFont-updated/RedHatMono/RedHatMonoVF-updated.woff2")
77+
format("woff2-variations"),
78+
url("https://goauthentik.io/fonts/RedHatFont-updated/RedHatMono/RedHatMonoVF-updated.woff2")
79+
format("woff2-variations");
80+
}
81+
82+
@font-face {
83+
font-family: "RedHatMonoVF";
84+
font-style: italic;
85+
font-weight: 300 700;
86+
font-display: fallback;
87+
src:
88+
local("Red Hat Mono"),
89+
url("/fonts/RedHatFont-updated/RedHatMono/RedHatMonoVF-updated-Italic.woff2")
90+
format("woff2-variations"),
91+
url("https://goauthentik.io/fonts/RedHatFont-updated/RedHatMono/RedHatMonoVF-updated-Italic.woff2")
92+
format("woff2-variations");
93+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
a[data-icon] {
2+
display: flex;
3+
gap: 0.5em;
4+
align-items: center;
5+
border-radius: var(--ifm-badge-border-radius);
6+
7+
&:hover {
8+
background-color: var(--ifm-hover-overlay);
9+
}
10+
}
11+
12+
a[data-icon]::before {
13+
display: block;
14+
content: "";
15+
width: 1.5rem;
16+
height: 1.5rem;
17+
background-repeat: no-repeat;
18+
background-position: center;
19+
}
20+
21+
a[data-icon]::after {
22+
display: block;
23+
content: attr(aria-label);
24+
}
25+
26+
@media (max-width: 1300px) {
27+
.navbar--fixed-top .navbar__items a[data-icon]::after {
28+
display: none;
29+
}
30+
}
31+
32+
@media (max-width: 998px) {
33+
.navbar--fixed-top .navbar__items a[data-icon] {
34+
display: none;
35+
}
36+
}
37+
38+
a[data-icon="github"]::before {
39+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
40+
}
41+
42+
a[data-icon="discord"]::before {
43+
background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20127.14%2096.36%22%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill%3A%23fff%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22%E5%9B%BE%E5%B1%82_2%22%20data-name%3D%22%E5%9B%BE%E5%B1%82%202%22%3E%3Cg%20id%3D%22Discord_Logos%22%20data-name%3D%22Discord%20Logos%22%3E%3Cg%20id%3D%22Discord_Logo_-_Large_-_White%22%20data-name%3D%22Discord%20Logo%20-%20Large%20-%20White%22%3E%3Cpath%20class%3D%22cls-1%22%20d%3D%22M107.7%2C8.07A105.15%2C105.15%2C0%2C0%2C0%2C81.47%2C0a72.06%2C72.06%2C0%2C0%2C0-3.36%2C6.83A97.68%2C97.68%2C0%2C0%2C0%2C49%2C6.83%2C72.37%2C72.37%2C0%2C0%2C0%2C45.64%2C0%2C105.89%2C105.89%2C0%2C0%2C0%2C19.39%2C8.09C2.79%2C32.65-1.71%2C56.6.54%2C80.21h0A105.73%2C105.73%2C0%2C0%2C0%2C32.71%2C96.36%2C77.7%2C77.7%2C0%2C0%2C0%2C39.6%2C85.25a68.42%2C68.42%2C0%2C0%2C1-10.85-5.18c.91-.66%2C1.8-1.34%2C2.66-2a75.57%2C75.57%2C0%2C0%2C0%2C64.32%2C0c.87.71%2C1.76%2C1.39%2C2.66%2C2a68.68%2C68.68%2C0%2C0%2C1-10.87%2C5.19%2C77%2C77%2C0%2C0%2C0%2C6.89%2C11.1A105.25%2C105.25%2C0%2C0%2C0%2C126.6%2C80.22h0C129.24%2C52.84%2C122.09%2C29.11%2C107.7%2C8.07ZM42.45%2C65.69C36.18%2C65.69%2C31%2C60%2C31%2C53s5-12.74%2C11.43-12.74S54%2C46%2C53.89%2C53%2C48.84%2C65.69%2C42.45%2C65.69Zm42.24%2C0C78.41%2C65.69%2C73.25%2C60%2C73.25%2C53s5-12.74%2C11.44-12.74S96.23%2C46%2C96.12%2C53%2C91.08%2C65.69%2C84.69%2C65.69Z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
44+
}

0 commit comments

Comments
 (0)