Skip to content

MrMeison/yc-object-storage-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

build-test

Deploy static website to Yandex Object Storage

This flow allows you to upload to Yandex Object Storage so you can use it with Yandex CDN for a static site serving.

Configuration

Key Value Type Required
accessKeyId Service account access key id string Yes
secretAccessKey Service account secret access key string Yes
bucketName Bucket name string Yes
sourceDir Path to upload folder string No
include Include patterns for files. multiline No
includeDots Include dots files. boolean No
exclude Exclude patterns for files. multiline No
clear Clear bucket before deploy (default: false) boolean No

Example

name: Deploy static website to Yandex Object Storage
on:
    push:
        branches:
            - master
jobs:
    deploy:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                node-version: [16.x]
        steps:
            - uses: actions/checkout@v3
            - uses: actions/setup-node@v3
              with:
                  node-version: ${{ matrix.node-version }}    
            - name: Install NPM dependencies
              run: npm ci
    
            - name: Build application
              run: npm run build
    
            - uses: MrMeison/yc-object-storage-action@main
              with:
                accessKeyId: ${{ secrets.ACCESS_KEY_ID }}
                secretAccessKey: ${{ secrets.SECRET_ACCESS_KEY }}
                bucketName: ${{ secrets.BUCKET }}
                sourceDir: ./dist
                clear: true