https://github.com/ukho/spo-recursive-file-upload
https://github.com/ukho/spo-recursive-file-upload
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ukho/spo-recursive-file-upload
- Owner: UKHO
- License: mit
- Created: 2022-09-20T08:22:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-02T19:15:07.000Z (about 1 year ago)
- Last Synced: 2025-08-07T03:07:42.277Z (12 months ago)
- Language: TypeScript
- Size: 7.97 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SPO Recursive File Upload
Upload a file, or files, to SharePoint Online using the `spsave` package.
## Inputs
`site_url`: Destination SPO site URL (without tralling / i.e. https://site not https://site/)
`username`: SPO account username. **Must have write privileges on the designated site.**
`password`: SPO account password.
`destination_path`: Relative destination path on SPO site. If path does not exist, it will be created. (without prefixed and trailing forward slash, i.e. 'How To Train Your Dragon/docs' not '/How To Train Your Dragon/docs/')
`source_path`: Source file path(s) to be uploaded to SPO. Separate multiple files using a semicolon `;`.
`base`: **DEPRICATED** If you want to preserve folders structure inside SharePoint folder, you can provide a base for you files. For example when using glob ['build/css/*.*'] and base: 'build', all css files will be loaded under [SharePoint folder]/css.
## Things you need to know
- Files are directly uploaded via the `glob` method in the `spsave` package.
- SPO account must not have multi-factor authentication turned on, or must use an application-specific password. Service accounts are preferred.
- Multiple files are uploaded to the same destination path.
- run `npm install` to get packages
- Pack is complied using vercel/ncc
- To build just run `npm run package`, this will compile the typescript and run ncc
## Example Usage
```yaml
...
uses: ukho/spo-recursive-file-upload@vversion
with:
site_url: https://domain.sharepoint.com/sites/my-site
username: ${{ secrets.SPO_USERNAME }}
password: ${{ secrets.SPO_PASSWORD }}
destination_path: Shared Documents
source_path: docs
base: docs
...
```
## Issues
This is released under an MIT any issues please feel free to take a copy, we will not be handling issues outside of our own use cases.
## Credits
This base application was taken from [s-KaiNet's SPSave](https://github.com/s-KaiNet/spsave).