Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on: push
permissions:
contents: read
pages: write
id-token: write
jobs:
yc_deploy_job:
runs-on: ubuntu-latest
name: A job to deploy to Yandex Cloud
steps:
- name: checkout
uses: actions/checkout@v4

- name: Login to Yandex Cloud Container Registry
id: login-cr
uses: yc-actions/yc-cr-login@v3
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}

- name: Build, tag, and push image to Yandex Cloud Container Registry
env:
CR_REGISTRY: crpf2ioj2mkhi07jbnbr
CR_REPOSITORY: my-cr-repo
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t cr.yandex/$CR_REGISTRY/$CR_REPOSITORY:$IMAGE_TAG .
docker push cr.yandex/$CR_REGISTRY/$CR_REPOSITORY:$IMAGE_TAG
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:latest
COPY deploy-app /app
WORKDIR /app
RUN npm i

ENTRYPOINT [ "npm", "start" ]