Skip to content

Update site title and copyright info #91

Update site title and copyright info

Update site title and copyright info #91

Workflow file for this run

# This file should be edited in GitHub, for immediate access to the Marketplace and Documentation
name: cdk-build-deployment
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
cdk:
if: github.repository == 'DerploidEntertainment/Website'
runs-on: ubuntu-20.04 # Should match devcontainer OS version (Debian/Ubuntu versions have a direct mapping)
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'test' }}
env:
NODE_ENV: ${{ github.ref == 'refs/heads/main' && 'prod' || 'test' }}
CDK_WORKING_DIR: cdk
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
DEPLOY_AWS_ACCOUNT: ${{ secrets.DEPLOY_AWS_ACCOUNT }}
MAIN_HOSTED_ZONE_ID: ${{ secrets.MAIN_HOSTED_ZONE_ID }}
REDIRECT_HOSTED_ZONE_IDS: ${{ secrets.REDIRECT_HOSTED_ZONE_IDS }}
REDIRECT_TLS_CERTIFICATE_ARN: ${{ secrets.REDIRECT_TLS_CERTIFICATE_ARN }}
DNSSEC_ALARM_SUBSCRIBE_EMAILS: ${{ secrets.DNSSEC_ALARM_SUBSCRIBE_EMAILS }}
HEALTH_CHECK_ALARM_SUBSCRIBE_EMAILS: ${{ secrets.HEALTH_CHECK_ALARM_SUBSCRIBE_EMAILS }}
DMARC_REPORT_RUA_EMAIL: ${{ secrets.DMARC_REPORT_RUA_EMAIL }}
DMARC_REPORT_RUF_EMAIL: ${{ secrets.DMARC_REPORT_RUF_EMAIL }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
lfs: true
- name: setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16 # Should match Node version that comes with GitHub Action runner OS version
cache: npm
cache-dependency-path: ${{ env.CDK_WORKING_DIR }}/package-lock.json
- name: CDK synth and deploy
run: |
cd ${{ env.CDK_WORKING_DIR }}
npm ci
awsProfile=derploid-site
aws configure --profile $awsProfile set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure --profile $awsProfile set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
npm run synth:${{ env.NODE_ENV }}
npm run deploy:${{ env.NODE_ENV }} -- --all --require-approval=never