upgrade to node18, split chunks for some node deps, add builderio san… #6
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
AWS_APP: stevezelek-com | |
NODE_VERSION: 18 | |
BUILD_DIR: public | |
CLOUDFLARE_ZONE: c272b1a950675498138a374bcbf3fe0f | |
jobs: | |
env: | |
runs-on: ubuntu-latest | |
outputs: | |
AWS_APP: ${{ env.AWS_APP }} | |
NODE_VERSION: ${{ env.NODE_VERSION }} | |
BUILD_DIR: ${{ env.BUILD_DIR }} | |
CLOUDFLARE_ZONE: ${{ env.CLOUDFLARE_ZONE }} | |
steps: | |
- run: echo "" | |
build: | |
needs: [env] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache NPM | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ needs.env.outputs.NODE_VERSION }} | |
cache: 'npm' | |
- name: Install | |
run: | | |
npm ci | |
npm run build:app | |
- name: Upload app artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ needs.env.outputs.AWS_APP }} | |
path: ${{ needs.env.outputs.BUILD_DIR }}/* | |
deploy-app: | |
needs: [env, build] | |
uses: smzelek/aws-hosting/.github/workflows/deploy-app.yml@main | |
secrets: inherit | |
with: | |
aws-app: ${{ needs.env.outputs.AWS_APP }} | |
app-artifact: ${{ needs.env.outputs.AWS_APP }} | |
cloudflare-zone: ${{ needs.env.outputs.CLOUDFLARE_ZONE }} |