Skip to content

Commit

Permalink
Merge branch 'development' of github.com:FusionAuth/fusionauth-site i…
Browse files Browse the repository at this point in the history
…nto development
  • Loading branch information
fusionandy committed Oct 26, 2023
2 parents 60f4a9f + 31d354e commit f590f8a
Show file tree
Hide file tree
Showing 13 changed files with 3,164 additions and 729 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cloudfrontfunctioncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: cloudfront_function_check
on:
pull_request:
paths:
- 'src/cloudfront/fusionauth-website-request-handler.js'
- 'src/cloudfront/functions/fusionauth-website-request-handler.js'
- '.github/workflows/cloudfrontfunctioncheck.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -22,5 +22,5 @@ jobs:
cache: 'npm'
cache-dependency-path: 'astro/package-lock.json'
- name: Check cloudfront function is syntactically correct.
run: node --check src/cloudfront/fusionauth-website-request-handler.js
run: node --check src/cloudfront/functions/fusionauth-website-request-handler.js
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/publish-site-redirect-rules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: publish-site-redirect-rules-to-s3

env:
AWS_ACCOUNT_ID: '172023253951'
AWS_REGION: us-east-1

on:
push:
branches:
- development
paths:
- 'src/lambdas/fusionauth-site-origin-handler/data/redirects.json'

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:bootstrap-05
steps:

- name: checkout
uses: actions/checkout@v4

- 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
working-directory: src/lambdas/fusionauth-site-origin-handler/data
run: |
aws s3 cp ./redirects.json s3://fusionauth-dev-us-east-1-artifacts/lambda/fusionauth-site-origin-handler/redirects.json
1 change: 1 addition & 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
13 changes: 0 additions & 13 deletions src/cloudfront/lambda-request-handler/package-lock.json

This file was deleted.

20 changes: 0 additions & 20 deletions src/cloudfront/lambda-request-handler/package.json

This file was deleted.

This file was deleted.

17 changes: 17 additions & 0 deletions src/lambdas/fusionauth-site-origin-handler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fusionauth-site-origin-handler

This is a Lambda@Edge function that handles redirects for fusionauth.dev.

## Localdev

You'll need Node 18 or later installed.

From this directory, install the dependencies.
```
npm install
```

Run the tests with AWS credentials that have permissions to read from the `fusionauth-dev-us-east-1-artifacts` bucket.
```
AWS_PROFILE=fusionauth-dev npm test
```
566 changes: 566 additions & 0 deletions src/lambdas/fusionauth-site-origin-handler/data/redirects.json

Large diffs are not rendered by default.

Loading

0 comments on commit f590f8a

Please sign in to comment.