Deploy to Yandex.Cloud Object Storage #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Yandex.Cloud Object Storage | |
on: | |
# Trigger the workflow every time you push to the `master` branch | |
# Using a different branch name? Replace `master` with your branch’s name | |
push: | |
branches: [master] | |
# Allows you to run this workflow manually from the Actions tab on GitHub. | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build application | |
run: pnpm 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 | |
- name: Deploy to Yandex Cloud Object Storage | |
uses: paulvstrashnov/yandex-s3-upload-action@main | |
with: | |
accessKeyId: ${{ secrets.ACCESS_KEY_ID }} | |
secretAccessKey: ${{ secrets.SECRET_ACCESS_KEY }} | |
bucket: ${{ secrets.BUCKET }} | |
localPath: './dist' | |
remotePath: './' | |
clearBucket: false |