View pipeline-resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
Environment: | |
Type: String | |
Default: Dev | |
Description: Environment identifier | |
Identifier: | |
Type: String | |
Default: StreetlightBlog |
View authService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios, { AxiosRequestConfig } from 'axios'; | |
import jwtDecode from 'jwt-decode'; | |
import AccessToken from '../types/AccessToken'; | |
import AuthData from '../types/AuthData'; | |
import IdToken from '../types/IdToken'; | |
const getAuthData = () : AuthData => | |
<AuthData>JSON.parse(window?.localStorage?.getItem('authData')); | |
const setAuthData = data => |
View pipeline-snippet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Create dev stack | |
run: | | |
aws cloudformation deploy --stack-name feature-$(echo ${GITHUB_REF##*/} | tr -cd '[a-zA-Z0-9-]') \ | |
--template-body file://cloudformation/site-resources.yml \ | |
--parameters ParameterKey=Environment,ParameterValue=Dev | |
--tags Key=environment,Value=dev |
View delete-everything.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3api delete-objects \ | |
--bucket ${bucket_name} \ | |
--delete "$(aws s3api list-object-versions \ | |
--bucket "${bucket_name}" \ | |
--output=json \ | |
--query='{Objects: Versions[].{Key:Key,VersionId:VersionId}}')" |
View vpc-nat-eip.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
VpcCidr: | |
Type: String | |
Default: 10.192.0.0/16 | |
PublicSubnetCidr: | |
Type: String | |
Default: 10.192.10.0/24 | |
PrivateSubnetCidr: | |
Type: String | |
Default: 10.192.20.0/24 |
View postgres-stack.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
PostgresVpcId: | |
Type: 'AWS::EC2::VPC::Id' | |
Subnet1: | |
Type: String | |
Subnet2: | |
Type: String | |
HostedZoneId: | |
Type: String |
View github-actions-sam-pipeline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pipeline | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'feature**' | |
env: | |
PIPELINE_USER_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
View sam-bootstrap-stack-named.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
This template deploys resources required for deploying a Lambda function via SAM. This template was initially | |
created by running sam pipeline bootstrap. This command creates a CloudFormation stack and deploys it to | |
a specific account. Therefore, this template can be updated to match future SAM requirements by running | |
sam pipeline bootstrap and then capturing the template from the generated stack. | |
The names of resources have been set in this template to allow for reuse across multiple Lambda deployments. | |
The GitHub actions workflow included in this project uses default values for resources which match the naming |
View sam-pipeline-bootstrap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Parameters: | |
PipelineUserArn: | |
Type: String | |
PipelineExecutionRoleArn: | |
Type: String | |
CloudFormationExecutionRoleArn: | |
Type: String |
View find-mkdocs-components.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . | grep -E "^\./components/(.*)/docs$" | while read -r path; do | |
folder=$(echo "$path" | sed 's/^.\/components\(.*\)\/docs$/\1/') | |
mkdir -p ./docs/components/$folder | |
cp -r $path/* ./docs/components/$folder | |
done |
NewerOlder