-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #337 from april/master
Completely revamp build system
- Loading branch information
Showing
24 changed files
with
3,997 additions
and
2,132 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: auth0-custom-lock | ||
env: | ||
NODE_ENV: 'development' | ||
nodeVersion: '14.x' | ||
pythonVersion: '3.x' | ||
AUTH0_DOMAIN: 'auth-dev.mozilla.auth0.com' | ||
AUTH0_CLIENT_ID: ${{ secrets.DEVELOPMENT_AUTH0_CLIENT_ID }} | ||
AUTH0_CLIENT_SECRET: ${{ secrets.DEVELOPMENT_AUTH0_CLIENT_SECRET }} | ||
AWS_CDN_BUCKET_NAME: ${{ secrets.DEVELOPMENT_AWS_CDN_BUCKET_NAME }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- refs/tags/*-pre | ||
|
||
jobs: | ||
dev-build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check for secrets to be set | ||
run: if [ ${#AWS_CDN_BUCKET_NAME} -lt 1 ]; then echo "Github Secrets not set"; exit 1; fi | ||
- uses: actions/checkout@v2 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.nodeVersion }} | ||
- name: Build Auth0 custom lock pages | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Install AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.DEVELOPMENT_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.DEVELOPMENT_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
- name: Sync files to S3 | ||
run: aws s3 cp --recursive dist s3://$AWS_CDN_BUCKET_NAME/nlx/$GITHUB_SHA | ||
- name: Running sanity checks prior to pushing to Auth0 | ||
run: ci/scripts/sanity-checks.sh | ||
- name: Deploy login page to Auth0 | ||
run: npm run deploy |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: auth0-custom-lock | ||
env: | ||
NODE_ENV: 'production' | ||
nodeVersion: '14.x' | ||
pythonVersion: '3.x' | ||
AUTH0_DOMAIN: 'auth-dev.mozilla.auth0.com' | ||
AUTH0_CLIENT_ID: ${{ secrets.PRODUCTION_AUTH0_CLIENT_ID }} | ||
AUTH0_CLIENT_SECRET: ${{ secrets.PRODUCTION_AUTH0_CLIENT_SECRET }} | ||
AWS_CDN_BUCKET_NAME: ${{ secrets.PRODUCTION_AWS_CDN_BUCKET_NAME }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- refs/tags/*-prod | ||
|
||
jobs: | ||
prod-build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check for secrets to be set | ||
run: if [ ${#AWS_CDN_BUCKET_NAME} -lt 1 ]; then echo "Github Secrets not set"; exit 1; fi | ||
- uses: actions/checkout@v2 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.nodeVersion }} | ||
- name: Build Auth0 custom lock pages | ||
run: | | ||
NODE_ENV=development npm ci | ||
npm run build | ||
- name: Install AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
- name: Sync files to S3 | ||
run: aws s3 cp --recursive dist s3://$AWS_CDN_BUCKET_NAME/nlx/$GITHUB_SHA | ||
- name: Running sanity checks prior to pushing to Auth0 | ||
run: ci/scripts/sanity-checks.sh | ||
- name: Deploy login page to Auth0 | ||
run: npm run deploy |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: auth0-custom-lock | ||
env: | ||
NODE_ENV: 'development' | ||
nodeVersion: '14.x' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
dev-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.nodeVersion }} | ||
- run: npm ci | ||
- run: npm run build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# ignore secrets, as used by `act` | ||
/config/secrets* | ||
|
||
/dist | ||
/node_modules | ||
/src/js/config/local-config.json |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.