Build, Test, and Deploy (WWW Prod) #83
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: Build, Test, and Deploy (WWW Prod) | |
run-name: "Build, Test, and Deploy (WWW Prod)" | |
on: | |
push: | |
branches: | |
- develop | |
- mainline | |
paths: | |
- packages/www/** | |
- .github/** | |
env: | |
NODE_VERSION: 18 | |
NEXT_PUBLIC_APP_URL: "https://app.brewdocs.beer" | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- run: npm ci | |
- run: npm run build -w packages/www | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: www-prod | |
path: packages/www/out | |
Test: | |
runs-on: ubuntu-latest | |
needs: ["Build"] | |
steps: | |
- run: echo "No tests yet..." | |
Deploy: | |
needs: ["Build", "Test"] | |
uses: matt-whitaker/aws-static-site/.github/workflows/deploy-static-site.yaml@mainline | |
with: | |
environment: "www-prod" | |
aws_default_region: "us-west-2" | |
artifact_name: "www-prod" | |
artifact_path: "packages/www/out" | |
secrets: | |
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws_s3_bucket: ${{ secrets.WWW_AWS_S3_BUCKET }} | |
aws_cloudfront_distribution_id: ${{ secrets.WWW_AWS_CLOUDFRONT_DISTRIBUTION_ID }} |