Home > OS >  Build folder is not exist in github action for outlook web add-in using react
Build folder is not exist in github action for outlook web add-in using react

Time:09-07

I create outlook web add-in using react and yo office tool. I have commit code in GitHub repo. I want add git actions that allow us automatic upload build folder content to S3 bucket via github actions. My action yaml file as following

name: Pre-dev branch

 on:
  push:
  branches: [ "pre-dev" ]
 pull_request:
branches: [ "pre-dev" ]

 jobs:
  build:
  runs-on: ubuntu-latest

strategy:
  matrix:
    node-version: [15.x]

steps:
  - uses: actions/checkout@v1
  - run: npm install
  - run: npm run build      
  - uses: jakejarvis/s3-sync-action@master
    with:
      args: --acl public-read --follow-symlinks --delete
    env:
      AWS_S3_BUCKET: 'shyam-pre-dev'
      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: 'dist'      # optional: defaults to entire repository

Update : My project package.json file content:

 "scripts": {
"build": "webpack --mode production",
"build:dev": "webpack --mode development",
"dev-server": "webpack serve --mode development",
"lint": "office-addin-lint check",
"lint:fix": "office-addin-lint fix",
"prettier": "office-addin-lint prettier",
"start": "office-addin-debugging start manifest.xml",
"start:desktop": "office-addin-debugging start manifest.xml desktop",
"start:web": "office-addin-debugging start manifest.xml web",
"stop": "office-addin-debugging stop manifest.xml",
"validate": "office-addin-manifest validate manifest.xml",
"watch": "webpack --mode development --watch"
}

once I commit code it is executing and give error 'Build folder is not exists. Anyone has any idea. Please help me.

CodePudding user response:

There is a difference between a webpack-based web application and react one. The output folder is different.

  • Related