Skip to content

note about deploy

note about deploy #136

Workflow file for this run

name: Deploy
on:
push:
branches:
- develop
- main
- nrel
- lbnl
- pnnl
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set node version
uses: actions/setup-node@v4
with:
node-version: 16.18.0
- name: Install and Build
run: |
npm install
npm install @angular/cli > /dev/null
npx ng build
- name: Deploy Main Site
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: dist
- name: Deploy S3 Production
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
AWS_REGION: us-east-1
if: github.ref == 'refs/heads/main'
run: |
aws s3 sync --delete ./dist s3://${{ secrets.AWS_PROD_BUCKET }}
- name: Deploy S3 Staging
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
AWS_REGION: us-east-1
if: github.ref == 'refs/heads/develop'
run: |
aws s3 sync --delete ./dist s3://${{ secrets.AWS_STAGING_BUCKET }}
- name: Deploy NREL
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/nrel'
with:
repository-name: BuildingEnergyTools/tools-website-nrel
branch: gh-pages
folder: dist
token: ${{ secrets.DEPLOY_STAGING_KEY }}
- name: Deploy LBNL
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/lbnl'
with:
repository-name: BuildingEnergyTools/tools-website-lbnl
branch: gh-pages
folder: dist
token: ${{ secrets.DEPLOY_STAGING_KEY }}
- name: Deploy PNNL
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/pnnl'
with:
repository-name: BuildingEnergyTools/tools-website-pnnl
branch: gh-pages
folder: dist
token: ${{ secrets.DEPLOY_STAGING_KEY }}