Skip to content

Commit

Permalink
Merge of docs migration to master (#2618)
Browse files Browse the repository at this point in the history
* account mgmt two factor email

* patch

* account mgmt 2F sms

* account mgmt webauthn

* account management pages

* more apis

* forms

* remainder of manage-users

* entity api

* entity types

* entity grants

* overview

* Initial migrate-users page.

* auth0 migration

* duende migration

* firebase migration

* general user migration doc

* remainder of bulk migration docs

* connectors docs

* apple idp

* scim docs

* epic games

* lifecycle/register-users pages

* /operate/deploy/cluster

* external jwt

* facebook

* operate/deploy docs

* google

* roadmap docs

* secure and monitor docs

* moved a misplaced directory, another security doc

* monitoring doc, nav frontmatter fix

* remaining secure-and-monitor docs

* troubleshooting doc

* tech support doc

* hypr

* linkedin

* links

* nintendo

* oidc

* index

* migrate.js changes, reference docs

* samlv2

* fix the switcher

* cleanup

* 5-minute guides

* fix the dupes

* sdk example apps

* ipd init

* the rest

* xbox

* sdk docs

* updated 5-minute guides

* put it back

* generic and two factor

* the rest of messengers

* scim

* scim-enterprise

* scim

* action

* api explorer

* apikey

* applications

* webhooks api page

* webauthn api doc

* audit log

* authentication

* consents

* emails

* errors

* event logs

* families

* groups

* hosted-backend

* integrations

* ip-acl

* jwt

* keys

* lambdas

* login

* message-templates

* fix import

* users api

* user-comments api

* users-actions docs

* user-action-reasons doc

* overview

* passwordless and reactor

* themes api doc

* registrations

* reports

* system

* tenants api doc

* LAMBDAS

* fix one import

* bump up the runner size

* Update dev-astro.yml

Update runs-on

* Update dev-astro.yml

* sdk examples index page

* migration long tail, part 1 of many

* more misc follow-ups

* remote markdown rendering, couple shared pages

* remote content component, acct mgmt doc

* events index page

* pre 1-25 two factor

* old system api

* fix them charts

* some style stuff

* get started migrate users

* features

* adv t det

* passport-to-fusionauth.mdx

* k8s

* sdks

* identity-providers index page

* saml stuff

* simplify the routing

* sidenav first pass

* put the quickstarts back. oops

* light mode tweaks

* fix some links

* default index pages

* feedback

* dark mode fields

* new nav update

* new WIP lambda function

* rel=canonical support, removed dup redirects, tests

* general cleanup

* added 404 page, more tests

* code that is all sean's fault

* compatibility updates for lambda

* no more floaters

* merge script from live lambda in dev

* Moved static resources to new site

* removed leading backslashes from urls

* allow markdown in <JSON> title

* rss feed

* fix

* this is bad and I am sorry

* nolog

* changed description on group member update/remove events

* fix some of the api issues on mobile

* fix some of the api issues on mobile

* move the rss feed somehwere it will publish

* fix release notes headings in archive

* remote content

* nav fix

* updated index paths

* a bunch of link fixes

* one more apis fix

* various link updates

* fix for missing tocs

* sorted better

* more link fixes

* jj/redirect rules from s3 (#2611)

* safety checkin

* safety checkin

* include package lock file, misc updates

* workflow for s3 upload

* only run workflow on push

* add readme

* fix cloudfront function check workflow

* PR review suggestions

* rename workflow

* link rewrites

* use mjs instead of js so lambda is happy, fix a bunch of missing semicolons

* Revert "Merge branch 'development' of github.com:FusionAuth/fusionauth-site into development"

This reverts commit f1be21e, reversing
changes made to 06ca13e.

* link fixes, updated redirect rule

* cleaning up after the merge

* fix release notes

* links

* final linkcheck changes

* updated ref to old CF function

* added lambda redirects

* various link updates

* more link updates

* update release notes to remove EAP notes and update release date.

* Redirect lambda (#2614)

* add terraform module to manage the lambda

* reduce the repo checkout size

* various cosmetic fixes

* dedupe the docsnav list

* darkmode aside white icons

* fixing link issues

* link checker fixes

* updated how-to redirect

* fixed blog section ts bug

* the long tail of link checks

* another busted link

* replaced a bunch of v1/tech links

* Revert "replaced a bunch of v1/tech links"

This reverts commit 79db1eb.

* release notes for 1.48.01

* converted remaining references to /docs/v1/tech

* landing

* move the cookie example image

* Docs navigation updates

* new fanciness

* indentation

* sean stuff

* Docs navigation updates

* cursor-pointer

* 1.48.0 doc for deprecating the Nashorn Lambda engine, and adding the tokens param to the OpenID Connect reconcile lambda function.

* bump DirectDownloads version

* fix system and 404

* remove legacy landing styles

* cloudfront module (#2617)

* cloudfront module

* update tf to import cloudfront, not create a new one

* add workflow for cloudfront

* fix paths

* add readme

* test

* revert test

* refactoring, replace temp lambda with lambda from this module

* testing code changes

* fix auth and redirect loop

* package updates, add site root to tests

* add root path to indexPaths, rename workflows

* remove function check workflow, no longer needed

* fix tests

* add cache invalidation to workflow

* use latest tag for runner

* use latest tag for other runner too :)

* run pipeline to test vars

* test 2

* test 3

* test 4

* test 5

* test 6

* test 7

* test 8

* test 9

* test 10

* test 11

* test 12

* env-aware publish workflow

* [skip ci] update terraform

* update prod cloudfront terraform

* [skip ci] fix state location

* update dev behaviors

* [skip ci] update 404 page

* [skip ci] better names in dev

* [skip ci] fix prod readme

* [skip ci] fix a few typos

* [skip ci] add landing to s3prefixes

* [skip ci] add praetorians to tests

* [skip ci] add pdf to tests

* release notes selector

* [skip ci] disable potentially dangerous workflows

* [skip ci] add the fusionauth-website-request-handler back for backwards compat

---------

Co-authored-by: Andy Pai <[email protected]>
Co-authored-by: Daniel DeGroff <[email protected]>
Co-authored-by: John Jeffers <[email protected]>
Co-authored-by: Sean Bobby <[email protected]>
  • Loading branch information
5 people authored Oct 31, 2023
1 parent 95c9ffd commit 8eefac3
Show file tree
Hide file tree
Showing 3,513 changed files with 99,344 additions and 92,573 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
86 changes: 86 additions & 0 deletions .github/workflows/cloudfront-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: cloudfront-publish

env:
AWS_REGION: us-east-1

on:
push:
branches:
# - master
- development
paths:
- 'src/cloudfront/**'
- '!src/cloudfront/*/lambdas/site-origin-request-handler/data/**' # ignore changes to data files
pull_request:
branches:
# - master
- development
paths:
- 'src/cloudfront/**'
- '!src/cloudfront/*/lambdas/site-origin-request-handler/data/**' # ignore changes to data files
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
deploy:
runs-on: fusionauth-standard
container: 752443094709.dkr.ecr.us-west-2.amazonaws.com/gha-runner-ubuntu-22.04:latest
steps:

- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: src/cloudfront # the repo is huge, so let's only check out what we need.

- name: set environment
run: |
if [ "${{ github.head_ref }}" == "master" ]; then
echo "ENVIRONMENT=prod" >> $GITHUB_ENV
echo "AWS_ACCOUNT_ID=121700706967" >> $GITHUB_ENV
echo "CF_DIST_ID=E1JZD75YLBY9RG" >> $GITHUB_ENV
echo "WORKDIR=src/cloudfront/prod/terraform" >> $GITHUB_ENV
else
echo "ENVIRONMENT=dev" >> $GITHUB_ENV
echo "AWS_ACCOUNT_ID=172023253951" >> $GITHUB_ENV
echo "CF_DIST_ID=E3N8W7YX4AAW44" >> $GITHUB_ENV
echo "WORKDIR=src/cloudfront/dev/terraform" >> $GITHUB_ENV
fi
- name: set aws credentials for svc account
uses: aws-actions/configure-aws-credentials@v4
with:
role-chaining: true
role-to-assume: arn:aws:iam::752443094709:role/github-actions
role-session-name: github-actions
aws-region: ${{ env.AWS_REGION }}

- name: setup terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.6.2

- name: terraform plan
if: github.event_name == 'pull_request'
working-directory: ${{ env.WORKDIR }}
run: terraform init && terraform plan

- name: terraform apply
if: github.event_name == 'push'
working-directory: ${{ env.WORKDIR }}
run: terraform init && terraform apply -auto-approve

- name: set aws credentials for destination account
uses: aws-actions/configure-aws-credentials@v4
with:
role-chaining: true
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github-actions
role-session-name: github-actions
aws-region: ${{ env.AWS_REGION }}

- name: invalidate the cache
if: github.event_name == 'push'
run: aws cloudfront create-invalidation --distribution-id ${{ env.CF_DIST_ID }} --paths "/*"
64 changes: 64 additions & 0 deletions .github/workflows/cloudfront-update-redirect-rules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: cloudfront-update-redirect-rules

env:
AWS_REGION: us-east-1

on:
push:
branches:
# - master
- development
paths:
- 'src/cloudfront/*/lambdas/site-origin-request-handler/data/redirects.json'
pull_request:
branches:
# - master
- development
paths:
- 'src/cloudfront/*/lambdas/site-origin-request-handler/data/redirects.json'
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
publish-to-s3:
runs-on: fusionauth-standard
container: 752443094709.dkr.ecr.us-west-2.amazonaws.com/gha-runner-ubuntu-22.04:latest
steps:

- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: src/cloudfront # the repo is huge, so let's only check out what we need.

- name: set environment
run: |
if [ "${{ github.head_ref }}" == "master" ]; then
echo "ENVIRONMENT=prod" >> $GITHUB_ENV
echo "AWS_ACCOUNT_ID=121700706967" >> $GITHUB_ENV
echo "FILE_SOURCE=src/cloudfront/prod/lambdas/site-origin-request-handler/data" >> $GITHUB_ENV
echo "S3_DEST=s3://fusionauth-prod-us-east-1-artifacts/lambda/site-origin-request-handler/redirects.json" >> $GITHUB_ENV
else
echo "ENVIRONMENT=dev" >> $GITHUB_ENV
echo "AWS_ACCOUNT_ID=172023253951" >> $GITHUB_ENV
echo "FILE_SOURCE=src/cloudfront/dev/lambdas/site-origin-request-handler/data/redirects.json" >> $GITHUB_ENV
echo "S3_DEST=s3://fusionauth-dev-us-east-1-artifacts/lambda/site-origin-request-handler/redirects.json" >> $GITHUB_ENV
fi
- name: validate json
run: cat "${{ env.FILE_SOURCE }}" | jq empty

- name: set aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-chaining: true
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github-actions
role-session-name: github-actions
aws-region: ${{ env.AWS_REGION }}

- name: upload file to s3
if: github.event_name == 'push'
run: aws s3 cp ${{ env.FILE_SOURCE}} ${{ env.S3_DEST }}
26 changes: 0 additions & 26 deletions .github/workflows/cloudfrontfunctioncheck.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/dev-astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-core-32-gb
defaults:
run:
working-directory: ./astro
Expand All @@ -54,7 +54,7 @@ jobs:
working-directory: .
run: |
CLOUDFRONT_FUNCTION_ETAG=$(aws cloudfront describe-function --name fusionauth-website-request-handler --query 'ETag' --output text)
CLOUDFRONT_FUNCTION_ETAG=$(aws cloudfront update-function --name fusionauth-website-request-handler --function-code fileb://src/cloudfront/fusionauth-website-request-handler.js --function-config Comment="Request handler for the FusionAuth website",Runtime="cloudfront-js-1.0" --if-match ${CLOUDFRONT_FUNCTION_ETAG} --query 'ETag' --output text)
CLOUDFRONT_FUNCTION_ETAG=$(aws cloudfront update-function --name fusionauth-website-request-handler --function-code fileb://src/cloudfront/functions/fusionauth-website-request-handler.js --function-config Comment="Request handler for the FusionAuth website",Runtime="cloudfront-js-1.0" --if-match ${CLOUDFRONT_FUNCTION_ETAG} --query 'ETag' --output text)
aws cloudfront publish-function --name fusionauth-website-request-handler --if-match ${CLOUDFRONT_FUNCTION_ETAG}
aws cloudfront create-invalidation --distribution-id ${{ secrets.DEV_DISTRIBUTION_ID }} --paths "/*"
4 changes: 2 additions & 2 deletions .github/workflows/invalidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: invalidate_cache
# Controls when the action will run.
on:
# run once a weekday at ~8am/8pm MT
schedule:
- cron: '31 1,13 * * *'
# schedule:
# - cron: '31 1,13 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ env:
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths:
- 'site/**'
- 'src/cloudfront/fusionauth-website-request-handler.js'
- '.github/workflows/main.yml'
# push:
# branches: [ master ]
# paths:
# - 'site/**'
# - 'src/cloudfront/fusionauth-website-request-handler.js'
# - '.github/workflows/main.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/prod-astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ env:
AWS_REGION: "us-east-2"
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
paths:
- 'astro/**'
- 'src/cloudfront/fusionauth-website-request-handler.js'
- '.github/workflows/prod-astro.yml'
# push:
# branches: ["master"]
# paths:
# - 'astro/**'
# - 'src/cloudfront/fusionauth-website-request-handler.js'
# - '.github/workflows/prod-astro.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/updatesitemap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: update_sitemap
# only ping google at certain times
on:
# run once a day at ~5am MT
schedule:
- cron: '31 10 * * *'
# schedule:
# - cron: '31 10 * * *'
workflow_dispatch:

jobs:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.env*
.jekyll-metadata
.jekyll-cache
.sass-cache
Expand Down Expand Up @@ -49,3 +50,7 @@ node_modules
.savant/cache

astro/.astro

# Local .terraform directories
**/.terraform/*
**/terraform/builds/*
54 changes: 22 additions & 32 deletions astro/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,30 @@ import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import indexPages from "astro-index-pages/index.js";
import {rehypeTasklistEnhancer} from './src/plugins/rehype-tasklist-enhancer';
import {marked} from 'marked';
import {codeTitleRemark} from './src/plugins/code-title-remark';

/*
* Configuring marked to render blog excerpts as plain text, effectively taking anything that would go to html and just spitting out the text.
* See: https://marked.js.org/using_pro
*/
const inlineExtensions = ['link', 'heading', 'code', 'codespan'].map(name => (
{
name,
renderer(token) {
return token.text;
}
}
));

const extensions = [
// every excerpt will be wrapped in a <p>, render what is inside before returning it
{
name: 'paragraph',
renderer(token) {
return this.parser.parseInline(token.tokens);
}
},
...inlineExtensions
];
const optionalIntegrations = [];
if (!process.env.DEV) {
optionalIntegrations.push(compress({
Image: false,
SVG: false,
}))
} else {
console.log('skipping compression');
}

marked.use({extensions});
const siteMapFilter = (page) => !page.startsWith('https://fusionauth.io/landing')

export default defineConfig({
const config = defineConfig({
build: {
format: 'file'
},
integrations: [
compress({
Image: false,
SVG: false,
}),
...optionalIntegrations,
mdx(),
sitemap(),
sitemap({
filter: siteMapFilter
}),
indexPages(),
tailwind({
config: {
Expand All @@ -52,10 +37,15 @@ export default defineConfig({
})
],
markdown: {
remarkPlugins: [
codeTitleRemark
],
rehypePlugins: [
// Tweak GFM task list syntax
rehypeTasklistEnhancer()
rehypeTasklistEnhancer(),
]
},
site: 'https://fusionauth.io/'
});

export default config;
Loading

0 comments on commit 8eefac3

Please sign in to comment.