Skip to content

cleanup

cleanup #30

name: forms-flow-theme-CD
on:
workflow_dispatch:
push:
branches:
- main
- develop
- release/*
- design-changes-5.3.0
paths:
- "forms-flow-theme/**"
- "VERSION"
defaults:
run:
shell: bash
jobs:
build:
name: Build and push artifacts to s3
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.17.0'
- name: Set version
if: ${{ github.ref != 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set version
if: ${{ github.ref == 'refs/heads/main' }}
working-directory: .
run: |
VER=$(cat VERSION)
VER=${VER/-alpha/''}
echo "VERSION=$VER" >> $GITHUB_ENV
- run: echo ${{ env.VERSION }}
- run: npm ci
working-directory: ./forms-flow-theme
- run: npm run build:webpack
working-directory: ./forms-flow-theme
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.REGION }}
- run: npm ci
working-directory: ./scripts
- run: BUCKET=${{ secrets.BUCKET}} VERSION=${{ env.VERSION }} node index forms-flow-theme
working-directory: ./scripts