name: Node.js Package

on:
  push:
    branches:
      - feature/framework
    tags:
      - 3.*.*

jobs:
  publish-npm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 13
          registry-url: https://registry.npmjs.org/
      - run: npm ci
      - run: npm run build
      # - run: npm publish
      #   env:
      #     NODE_AUTH_TOKEN: ${{secrets.npm_token}}
      - uses: jakejarvis/s3-sync-action@master
        with:
          args: --follow-symlinks --delete
        env:
          AWS_S3_BUCKET: ${{ secrets.aws_s3_bucket }}
          AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
          AWS_REGION: 'eu-west-1'   # optional: defaults to us-east-1
          SOURCE_DIR: 'docroot'      # optional: defaults to entire repository

name: Node.js Package

on:
  push:
    branches:
      - feature/framework
    tags:
      - 3.*.*

jobs:
  publish-npm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 13
          registry-url: https://registry.npmjs.org/
      - run: npm ci
      - run: npm run build
      # - run: npm publish
      #   env:
      #     NODE_AUTH_TOKEN: ${{secrets.npm_token}}
      - run: ln -s ../dist
      - uses: jakejarvis/s3-sync-action@master
        with:
          args: --follow-symlinks --delete
        env:
          AWS_S3_BUCKET: ${{ secrets.aws_s3_bucket }}
          AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
          AWS_REGION: 'eu-west-1'   # optional: defaults to us-east-1
          SOURCE_DIR: 'docroot'      # optional: defaults to entire repository

Create symlink on docroot folder and push it to s3.
Create symlink on docroot folder and push it to s3.
