Giter Club home page Giter Club logo

action-sharepoint-publish's Introduction

action-sharepoint-publish

This GitHub action is forked from a repo that deployed project archives to SharePoint Online. The action is modified to deploy build folders of a React app.

Inputs

site_url

Required The complete url of your sharepoint site. Example : https://you.sharepoint.com/sites/mySite

library_folder

Required The path relative to the library where to upload a file. Example Shared documents/releases.

โš ๏ธ Do not include the first slash

sharepoint_user

Required The username to use for authentication. Example [email protected].

sharepoint_password

Required The user's password. Example MyPassword123!.

๐Ÿ’ก Tip : It is recommended to use GitHub Actions Secrets to store sensible informations like passwords

Example usage

This action is particularly useful when triggered by new releases :

name: SharePoint Deploy

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  publish:
    runs-on: ubuntu-latest
    
    strategy:
      matrix:
        node-version: [12.x]
    
    steps:
    
    - name: Cloning repository
      uses: actions/checkout@v2
    
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    
    - name: Install packages
      run: npm install
    
    - name: Build page
      run: npm run build
      env:
        CI: false
        
    - name: Remove everything except build folder
      run: ls . | grep -v "build" | xargs rm -r

    - name: Deploy to Sharepoint
      uses: harsohailB/[email protected]
      with:
       site_url: 'https://you.sharepoint.com/sites/mySite'
       library_folder: 'Shared documents/releases'
       sharepoint_user: ${{ secrets.USER }}
       sharepoint_password: ${{ secrets.PASSWORD }}

action-sharepoint-publish's People

Contributors

cdevs avatar obrassard avatar harsohailb avatar larshp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.