Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload-cloud

GitHub Action

Publish to Sharepoint

v1.0.1

Publish to Sharepoint

upload-cloud

Publish to Sharepoint

Create a archive of the repository and upload it to a Sharepoint online via client id and secret

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish to Sharepoint

uses: obrassard/[email protected]

Learn more about this action in obrassard/action-sharepoint-publish

Choose a version

action-sharepoint-publish

A simple Github Action that create an archive of a repository and upload it to a Sharepoint library

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 recommanded 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 release'

on:
  release:
    types: created

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
    
    - name: Cloning repo # This step is required
      uses: actions/checkout@v2

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