{"id":344107,"date":"2023-01-18T03:00:48","date_gmt":"2023-01-18T03:00:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=344107"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=344107","title":{"rendered":"<span>Github Actions. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 <\/h3>\n<p><a href=\"#entry\" rel=\"noopener noreferrer nofollow\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/p>\n<p><a href=\"#workflow-files\" rel=\"noopener noreferrer nofollow\">1. Workflow \u0444\u0430\u0439\u043b\u044b<\/a><\/p>\n<p><a href=\"#actions\" rel=\"noopener noreferrer nofollow\">2. Actions<\/a><\/p>\n<p><a href=\"#example\" rel=\"noopener noreferrer nofollow\">3. \u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a><\/p>\n<p><a href=\"#secrets\" rel=\"noopener noreferrer nofollow\">4. Secrets<\/a><\/p>\n<p><a href=\"#conclusion\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<p><a class=\"anchor\" name=\"entry\" id=\"entry\"><\/a><\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e \u043c\u043e\u0435\u043c \u043e\u043f\u044b\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/CI\/CD\" rel=\"noopener noreferrer nofollow\"><u>CI\/CD<\/u><\/a> c \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.github.com\/ru\/actions\" rel=\"noopener noreferrer nofollow\">GitHub Actions<\/a>.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0442\u0435\u043c, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0434\u043b\u044f \u043b\u0438\u0447\u043d\u043e\u0433\u043e\/\u0443\u0447\u0435\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 GitHub Actions. \u041f\u0440\u0438\u0447\u0435\u043c \u044d\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0434\u0430\u0436\u0435 \u0441 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c (\u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438).<\/p>\n<p>\u0410\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u0443\u044e \u043d\u0430 \u0442\u0435\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435 \u0441\u0430\u043c\u044b\u043c\u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438, \u0447\u0438\u0442\u0430\u044f <a href=\"https:\/\/docs.github.com\/ru\/actions\/quickstart#creating-your-first-workflow\" rel=\"noopener noreferrer nofollow\">\u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/a> \u043e\u0442 Github.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Github. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u043e\u0439 \u0443 \u0432\u0430\u0441 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u0442\u0435\u043a: \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 Github Actions \u0438 \u0443\u043c\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><a class=\"anchor\" name=\"workflow-files\" id=\"workflow-files\"><\/a><\/p>\n<h3>1. Workflow \u0444\u0430\u0439\u043b\u044b<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e Github \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Actions. \u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 <em>Actions<\/em> \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 Github \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0430, \u043d\u0430\u0447\u043d\u0435\u043c \u0441 <em>Simple workflow<\/em>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/35c\/3a0\/576\/35c3a0576f1db083232cc8c58a708562.png\" alt=\"\u0428\u0430\u0431\u043b\u043e\u043d &quot;Simple workflow&quot;\" title=\"\u0428\u0430\u0431\u043b\u043e\u043d &quot;Simple workflow&quot;\" width=\"1073\" height=\"608\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/35c\/3a0\/576\/35c3a0576f1db083232cc8c58a708562.png\"\/><figcaption>\u0428\u0430\u0431\u043b\u043e\u043d &#171;Simple workflow&#187;<\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <code>Configure<\/code> \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e workflow \u0444\u0430\u0439\u043b\u0430 simple.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">name: CI on:    # \u0421\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 jobs     push:       branches: [ \"main\" ]     pull_request:       branches: [ \"main\" ]  # jobs \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c jobs:     # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 job \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e     my_build_job:       # \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b       runs-on: ubuntu-latest         # \u0428\u0430\u0433\u0438         steps:           # Actions \u043e\u0442 github: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0433\u0438\u0442 \u0438 \u0442.\u0434.           - uses: actions\/checkout@v3            # \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 shell           - name: Run a one-line script             run: echo Hello, world!            # \u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043d\u043e\u0433\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 shell           - name: Run a multi-line script             run: |                 echo Add other actions to build,                 echo test, and deploy your project.<\/code><\/pre>\n<p><em>\u0427\u0438\u0442\u0430\u044e \u0444\u0430\u0439\u043b<\/em>: <code>workflow<\/code> \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 <a href=\"https:\/\/docs.github.com\/en\/actions\/learn-github-actions\/understanding-github-actions#jobs\" rel=\"noopener noreferrer nofollow\"><u>jobs<\/u><\/a> \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>my_build_job<\/code> \u043f\u0440\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Pull Request \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 <code>main<\/code>. <code>my_build_job<\/code> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u041e\u0421 Ubuntu, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>action<\/code> \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>actions\/checkout@v3<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 2 \u0448\u0430\u0433\u0430: \u043f\u0438\u0448\u0443\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\u044b.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <code>name-of-your-wokflow-file.yml<\/code> \u0444\u0430\u0439\u043b\u0430, \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 c \u0444\u0430\u0439\u043b\u043e\u043c <code>.github\/workflows\/name-of-your-wokflow-file.yml<\/code>. Workflow \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043c\u044b\u0441\u043b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0430\u043c\u0438 \u0432\u0435\u0442\u043a\u0435.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439&#187; &#8212; \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0434\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u043c,<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430,<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0430\u043f\u043e\u043a\/\u0444\u0430\u0439\u043b\u043e\u0432) \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0447\u0442\u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0430, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>Github \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443(\u0431\u0435\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439: \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435, git, \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0435\u0442\u043a\u0438, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430, \u0442\u0435\u0441\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0432\u043d\u0435\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043d\u0430 \u0432\u0430\u0448 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043b\u0443 \u0432\u0430\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 <em>\u0434\u0435\u043f\u043b\u043e\u0439<\/em> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 <code>job<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 <a href=\"https:\/\/docs.github.com\/en\/actions\/learn-github-actions\/understanding-github-actions#runners\" rel=\"noopener noreferrer nofollow\"><u>runners<\/u><\/a>. \u0420\u0430\u043d\u043d\u0435\u0440 &#8212; \u044d\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 <code>job<\/code>.<\/p>\n<p><a class=\"anchor\" name=\"actions\" id=\"actions\"><\/a><\/p>\n<h3>2. Actions<\/h3>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0432 workflow-\u0444\u0430\u0439\u043b\u0435 &#8212; <code>actions<\/code> \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <code>uses<\/code>. \u0412 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u044d\u0442\u043e &#8212; <a href=\"https:\/\/github.com\/actions\/checkout\" rel=\"noopener noreferrer nofollow\">actions\/checkout@v3<\/a>. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>action<\/code>. \u041d\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>job<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435:<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e <code>git<\/code>, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0430\u043f\u043a\u0438 \u043d\u0443\u0436\u043d\u044b\u0435, \u043f\u0438\u0448\u0435\u0442 \u0444\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c11\/4b2\/e75\/c114b2e7509501a1258808ab9e2cb847.png\" alt=\"\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b actions\/checkout@v3\" title=\"\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b actions\/checkout@v3\" width=\"1269\" height=\"880\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c11\/4b2\/e75\/c114b2e7509501a1258808ab9e2cb847.png\"\/><figcaption>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b actions\/checkout@v3<\/figcaption><\/figure>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <code>actions<\/code>, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0432\u044b\u0431\u0440\u0430\u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430 <a href=\"https:\/\/github.com\/marketplace\/\" rel=\"noopener noreferrer nofollow\">Github Marketplace<\/a>.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434\u0430\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 <a href=\"https:\/\/github.com\/marketplace\/actions\/ssh-command\" rel=\"noopener noreferrer nofollow\">D3rHase\/ssh-command-action@v0.2.2<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u043e\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenSSH\" rel=\"noopener noreferrer nofollow\">ssh<\/a> \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p><a class=\"anchor\" name=\"example\" id=\"example\"><\/a><\/p>\n<h3>3. \u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h3>\n<p>\u041c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442-\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c Ruby on Rails, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0435\u0437 \u043d\u0430\u0447\u0438\u043d\u043a\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438. \u042f \u0432\u044b\u0431\u0440\u0430\u043b\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 workflow-\u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 Github \u0438 \u0434\u043e\u043f\u0438\u0441\u0430\u043b\u0430 \u0435\u0433\u043e \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>\u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0434\u043b\u044f CI\/CD. \u0412 \u0444\u0430\u0439\u043b\u0435 rubyonrails.yml \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0442\u0430\u043a\u0430\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u043c \u043a\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <em>git pull<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <em>docker<\/em> \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>\u0423 \u0432\u0430\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 &#8212; \u044d\u0442\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>npm run build<\/code> \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0443\u0448\u0430\u0435\u0442 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 <em>nginx<\/em>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0448\u0435\u043b \u0431\u044b <a href=\"https:\/\/github.com\/marketplace\/actions\/run-commands-via-ssh\" rel=\"noopener noreferrer nofollow\">garygrossgarten\/github-action-scp@v1.0<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 .github\/workflows\/rubyonrails.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># This workflow will install a prebuilt Ruby version, install dependencies, and # run tests and linters. Then it pulls new features from my repo and # rebuild containers on remote server through ssh.  name: \"Ruby on Rails CI\" on:   push:     branches: [\"main\"]   pull_request:     branches: [\"main\"]  jobs:   lint:     runs-on: ubuntu-latest     steps:       - name: Checkout code         uses: actions\/checkout@v3       - name: Install Ruby and gems         uses: ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0         with:           bundler-cache: true       - name: Lint Ruby files         run: bundle exec rubocop    test:     needs: lint     runs-on: ubuntu-latest     services:       postgres:         image: postgres:14         ports:           - \"5432:5432\"         env:           POSTGRES_DB: rails_test           POSTGRES_USER: rails           POSTGRES_PASSWORD: password     env:       POSTGRES_DB: rails_test       POSTGRES_USER: rails       POSTGRES_PASSWORD: password       RAILS_ENV: test       DATABASE_URL: \"postgres:\/\/rails:password@localhost:5432\/rails_test\"     steps:       - name: Checkout code         uses: actions\/checkout@v3       - name: Install Ruby and gems         uses: ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0         with:           bundler-cache: true       - name: Set up database schema         run: bin\/rails db:schema:load       - name: Run tests         run: |           bundle exec rake db:drop db:create db:migrate db:seed;           bin\/rake test;    deploy:     needs: test     runs-on: ubuntu-latest     if: github.ref == 'refs\/heads\/main'     steps:       - name: Checkout code         uses: actions\/checkout@v3       - name: Install Ruby and gems         uses: ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0         with:           bundler-cache: true       - name: Run command on remote server         uses: D3rHase\/ssh-command-action@v0.2.2         with:           host: ${{secrets.SSH_HOST}}           user: ${{secrets.SSH_USER}}           private_key: ${{secrets.SSH_PRIVATE_KEY}}           command: |             cd ${{ secrets.PROJECT_FOLDER }};             git checkout main;             git pull;             docker-compose --file docker-compose.prod.yml down;             docker-compose --file docker-compose.prod.yml up -d;             docker system prune --all --force;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><code>Workflow<\/code> \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 Pull Request \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 <code>main<\/code>. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u044e 3 <code>jobs<\/code> \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 <code>lint<\/code>, <code>test<\/code> \u0438 <code>deploy<\/code> \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u043d\u043d\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 Ubuntu, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>actions\/checkout@v3<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 Ruby \u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4<\/code>. \u041b\u0438\u043d\u0442\u0435\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u043e\u0442\u0435\u043a\u0438 <code>rubocop<\/code>. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c <code>postgres<\/code> \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0411\u0414, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f <em>\u0441\u0438\u0434\u044b<\/em> \u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u044b. \u0428\u0430\u0433 <code>deploy<\/code> \u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 `main`. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f.\u0442\u0441\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>action<\/code> <a href=\"https:\/\/github.com\/marketplace\/actions\/ssh-command\" rel=\"noopener noreferrer nofollow\">D3rHase\/ssh-command-action@v0.2.2<\/a>. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code>, \u043f\u0440\u0438\u0442\u044f\u0433\u0438\u0432\u0430\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e <em>docker<\/em> \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0447\u0438\u0449\u0443 \u043b\u0438\u0448\u043d\u0435\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 <em>docker<\/em>.<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043d\u0430 \u043c\u043e\u0435\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d <em>git<\/em>, <em>docker<\/em>, <em>docker-compose<\/em>, Github \u043f\u043e\u0434\u0440\u0443\u0436\u0435\u043d \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SSH-\u043a\u043b\u044e\u0447\u0430.<\/p>\n<p>\u0420\u0430\u043d\u043d\u0435\u0440\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>needs<\/code> \u0432 \u0442\u0435\u043b\u0435 <code>job<\/code>.<\/p>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u043d\u043d\u0435\u0440\u044b \u043d\u0430 Github \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u043e \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/51a\/e1c\/eee\/51ae1ceee85ce5304db7214c93430b28.png\" alt=\"\u0412\u0438\u0434 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430 jobs\" title=\"\u0412\u0438\u0434 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430 jobs\" width=\"1328\" height=\"527\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/51a\/e1c\/eee\/51ae1ceee85ce5304db7214c93430b28.png\"\/><figcaption>\u0412\u0438\u0434 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430 jobs<\/figcaption><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435, \u0447\u0442\u043e \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u0442\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0438\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0438\u043f\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 job \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">- name: Run command on remote server    uses: D3rHase\/ssh-command-action@v0.2.2    with:       host: ${{secrets.SSH_HOST}}       user: ${{secrets.SSH_USER}}       private_key: ${{secrets.SSH_PRIVATE_KEY}}       command: |         echo '--- START WORK ON REMOTE SERVER ---';         cd ${{ secrets.PROJECT_FOLDER }};         echo '--- LIST OF FILES ---';         ls -al;         echo '--- GIT INFORMATION ---'         git co dev;         git pull;         echo '--- DOCKER OPERATIONS ---';         docker-compose down;         echo '--- LIST OF DOCKER CONTAINERS AFTER STOPING DOCKER CONTAINERS ---';         docker ps;         docker-compose --file docker-compose.prod.yml up -d;         docker system prune --all --force;         echo '--- LIST OF DOCKER CONTAINERS AFTER STARTING DOCKER CONTAINERS ---';         docker ps;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 CI\/CD \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435.<\/p>\n<p><a class=\"anchor\" name=\"secrets\" id=\"secrets\"><\/a><\/p>\n<h3>4. Secrets<\/h3>\n<p>\u0412 rubyinrails.yml \u0444\u0430\u0439\u043b\u0435 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>secrets<\/code>. \u042d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0432\u0430\u0448 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 Github \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 SSH \u043a\u043b\u044e\u0447 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"bash\">cd ~\/.ssh; ssh-keygen -t ed25519 -C \"your_email@example.com\"<\/code><\/pre>\n<p>\u0421\u043a\u0430\u0436\u0435\u043c, \u044f \u043d\u0430\u0437\u0432\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b test \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 2 \u0444\u0430\u0439\u043b\u0430 &#8212; \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/112\/51f\/69f\/11251f69fde70665397155ef72fefaf3.png\" alt=\"\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 ssh-\u043a\u043b\u044e\u0447\u0438\" title=\"\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 ssh-\u043a\u043b\u044e\u0447\u0438\" width=\"1034\" height=\"135\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/112\/51f\/69f\/11251f69fde70665397155ef72fefaf3.png\"\/><figcaption>\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 ssh-\u043a\u043b\u044e\u0447\u0438<\/figcaption><\/figure>\n<ol start=\"2\">\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u044f \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 <code>SSH_PRIVATE_KEY<\/code> \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 <em>Settings -> Secrets -> Actions:<\/em><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b\u0430 \u0435\u0449\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>SSH_HOST<\/code> \u0438 <code>SSH_USER<\/code>, <code>PROJECT_FOLDER<\/code> \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c.<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0ac\/7f4\/87c\/0ac7f487c2b5f827587f3a72e200b47e.png\" alt=\"\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f actions\" title=\"\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f actions\" width=\"1177\" height=\"826\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ac\/7f4\/87c\/0ac7f487c2b5f827587f3a72e200b47e.png\"\/><figcaption>\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f actions<\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"conclusion\" id=\"conclusion\"><\/a><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u0442\u043e\u0433\u043e \u043f\u043e \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c workflow.yml \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0434\u0435 \u0438 \u043a\u0430\u043a \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c <code>actions<\/code> \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 bash-\u0441\u043a\u0440\u0438\u043f\u0442, \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0430\u0448\u0435\u043c <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044f \u0432\u0430\u043c \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/711278\/\"> https:\/\/habr.com\/ru\/post\/711278\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 <\/h3>\n<p><a href=\"#entry\" rel=\"noopener noreferrer nofollow\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a><\/p>\n<p><a href=\"#workflow-files\" rel=\"noopener noreferrer nofollow\">1. Workflow \u0444\u0430\u0439\u043b\u044b<\/a><\/p>\n<p><a href=\"#actions\" rel=\"noopener noreferrer nofollow\">2. Actions<\/a><\/p>\n<p><a href=\"#example\" rel=\"noopener noreferrer nofollow\">3. \u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a><\/p>\n<p><a href=\"#secrets\" rel=\"noopener noreferrer nofollow\">4. Secrets<\/a><\/p>\n<p><a href=\"#conclusion\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<p><a class=\"anchor\" name=\"entry\" id=\"entry\"><\/a><\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e \u043c\u043e\u0435\u043c \u043e\u043f\u044b\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/CI\/CD\" rel=\"noopener noreferrer nofollow\"><u>CI\/CD<\/u><\/a> c \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/docs.github.com\/ru\/actions\" rel=\"noopener noreferrer nofollow\">GitHub Actions<\/a>.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0442\u0435\u043c, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0434\u043b\u044f \u043b\u0438\u0447\u043d\u043e\u0433\u043e\/\u0443\u0447\u0435\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 GitHub Actions. \u041f\u0440\u0438\u0447\u0435\u043c \u044d\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0434\u0430\u0436\u0435 \u0441 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c (\u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438).<\/p>\n<p>\u0410\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u0443\u044e \u043d\u0430 \u0442\u0435\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435 \u0441\u0430\u043c\u044b\u043c\u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438, \u0447\u0438\u0442\u0430\u044f <a href=\"https:\/\/docs.github.com\/ru\/actions\/quickstart#creating-your-first-workflow\" rel=\"noopener noreferrer nofollow\">\u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/a> \u043e\u0442 Github.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Github. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u043e\u0439 \u0443 \u0432\u0430\u0441 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u0442\u0435\u043a: \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#8212; \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 Github Actions \u0438 \u0443\u043c\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><a class=\"anchor\" name=\"workflow-files\" id=\"workflow-files\"><\/a><\/p>\n<h3>1. Workflow \u0444\u0430\u0439\u043b\u044b<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e Github \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Actions. \u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 <em>Actions<\/em> \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 Github \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0430, \u043d\u0430\u0447\u043d\u0435\u043c \u0441 <em>Simple workflow<\/em>.<\/p>\n<figure class=\"full-width\"><figcaption>\u0428\u0430\u0431\u043b\u043e\u043d &#171;Simple workflow&#187;<\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <code>Configure<\/code> \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e workflow \u0444\u0430\u0439\u043b\u0430 simple.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">name: CI on:    # \u0421\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 jobs     push:       branches: [ \"main\" ]     pull_request:       branches: [ \"main\" ]  # jobs \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c jobs:     # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 job \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e     my_build_job:       # \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b       runs-on: ubuntu-latest         # \u0428\u0430\u0433\u0438         steps:           # Actions \u043e\u0442 github: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0433\u0438\u0442 \u0438 \u0442.\u0434.           - uses: actions\/checkout@v3            # \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 shell           - name: Run a one-line script             run: echo Hello, world!            # \u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u043d\u043e\u0433\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 shell           - name: Run a multi-line script             run: |                 echo Add other actions to build,                 echo test, and deploy your project.<\/code><\/pre>\n<p><em>\u0427\u0438\u0442\u0430\u044e \u0444\u0430\u0439\u043b<\/em>: <code>workflow<\/code> \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 <a href=\"https:\/\/docs.github.com\/en\/actions\/learn-github-actions\/understanding-github-actions#jobs\" rel=\"noopener noreferrer nofollow\"><u>jobs<\/u><\/a> \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>my_build_job<\/code> \u043f\u0440\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Pull Request \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 <code>main<\/code>. <code>my_build_job<\/code> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u041e\u0421 Ubuntu, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>action<\/code> \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>actions\/checkout@v3<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 2 \u0448\u0430\u0433\u0430: \u043f\u0438\u0448\u0443\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\u044b.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f <code>name-of-your-wokflow-file.yml<\/code> \u0444\u0430\u0439\u043b\u0430, \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 c \u0444\u0430\u0439\u043b\u043e\u043c <code>.github\/workflows\/name-of-your-wokflow-file.yml<\/code>. Workflow \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043c\u044b\u0441\u043b \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0430\u043c\u0438 \u0432\u0435\u0442\u043a\u0435.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439&#187; &#8212; \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0434\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u043c,<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430,<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \u043f\u0430\u043f\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0430\u043f\u043e\u043a\/\u0444\u0430\u0439\u043b\u043e\u0432) \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0447\u0442\u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443.<\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c <code>workflow<\/code> \u0444\u0430\u0439\u043b\u0430, \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>Github \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443(\u0431\u0435\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439: \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435, git, \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0435\u0442\u043a\u0438, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0432 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430, \u0442\u0435\u0441\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0432\u043d\u0435\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043d\u0430 \u0432\u0430\u0448 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u043b\u0443 \u0432\u0430\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 <em>\u0434\u0435\u043f\u043b\u043e\u0439<\/em> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 <code>job<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 <a href=\"https:\/\/docs.github.com\/en\/actions\/learn-github-actions\/understanding-github-actions#runners\" rel=\"noopener noreferrer nofollow\"><u>runners<\/u><\/a>. \u0420\u0430\u043d\u043d\u0435\u0440 &#8212; \u044d\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 <code>job<\/code>.<\/p>\n<p><a class=\"anchor\" name=\"actions\" id=\"actions\"><\/a><\/p>\n<h3>2. Actions<\/h3>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0432 workflow-\u0444\u0430\u0439\u043b\u0435 &#8212; <code>actions<\/code> \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <code>uses<\/code>. \u0412 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u044d\u0442\u043e &#8212; <a href=\"https:\/\/github.com\/actions\/checkout\" rel=\"noopener noreferrer nofollow\">actions\/checkout@v3<\/a>. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>action<\/code>. \u041d\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>job<\/code>, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435:<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e <code>git<\/code>, \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u0430\u043f\u043a\u0438 \u043d\u0443\u0436\u043d\u044b\u0435, \u043f\u0438\u0448\u0435\u0442 \u0444\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b actions\/checkout@v3<\/figcaption><\/figure>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <code>actions<\/code>, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0432\u044b\u0431\u0440\u0430\u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430 <a href=\"https:\/\/github.com\/marketplace\/\" rel=\"noopener noreferrer nofollow\">Github Marketplace<\/a>.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434\u0430\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 <a href=\"https:\/\/github.com\/marketplace\/actions\/ssh-command\" rel=\"noopener noreferrer nofollow\">D3rHase\/ssh-command-action@v0.2.2<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u043e\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenSSH\" rel=\"noopener noreferrer nofollow\">ssh<\/a> \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p><a class=\"anchor\" name=\"example\" id=\"example\"><\/a><\/p>\n<h3>3. \u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h3>\n<p>\u041c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442-\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c Ruby on Rails, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0435\u0437 \u043d\u0430\u0447\u0438\u043d\u043a\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438. \u042f \u0432\u044b\u0431\u0440\u0430\u043b\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 workflow-\u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 Github \u0438 \u0434\u043e\u043f\u0438\u0441\u0430\u043b\u0430 \u0435\u0433\u043e \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>\u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0434\u043b\u044f CI\/CD. \u0412 \u0444\u0430\u0439\u043b\u0435 rubyonrails.yml \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0442\u0430\u043a\u0430\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0430 \u043b\u0438\u043d\u0442\u0435\u0440\u043e\u043c \u043a\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <em>git pull<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <em>docker<\/em> \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>\u0423 \u0432\u0430\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 &#8212; \u044d\u0442\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>npm run build<\/code> \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0443\u0448\u0430\u0435\u0442 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 <em>nginx<\/em>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0448\u0435\u043b \u0431\u044b <a href=\"https:\/\/github.com\/marketplace\/actions\/run-commands-via-ssh\" rel=\"noopener noreferrer nofollow\">garygrossgarten\/github-action-scp@v1.0<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 .github\/workflows\/rubyonrails.yml<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># This workflow will install a prebuilt Ruby version, install dependencies, and # run tests and linters. Then it pulls new features from my repo and # rebuild containers on remote server through ssh.  name: \"Ruby on Rails CI\" on:   push:     branches: [\"main\"]   pull_request:     branches: [\"main\"]  jobs:   lint:     runs-on: ubuntu-latest     steps:       - name: Checkout code         uses: actions\/checkout@v3       - name: Install Ruby and gems         uses: ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0         with:           bundler-cache: true       - name: Lint Ruby files         run: bundle exec rubocop    test:     needs: lint     runs-on: ubuntu-latest     services:       postgres:         image: postgres:14         ports:           - \"5432:5432\"         env:           POSTGRES_DB: rails_test           POSTGRES_USER: rails           POSTGRES_PASSWORD: password     env:       POSTGRES_DB: rails_test       POSTGRES_USER: rails       POSTGRES_PASSWORD: password       RAILS_ENV: test       DATABASE_URL: \"postgres:\/\/rails:password@localhost:5432\/rails_test\"     steps:       - name: Checkout code         uses: actions\/checkout@v3       - name: Install Ruby and gems         uses: ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0         with:           bundler-cache: true       - name: Set up database schema         run: bin\/rails db:schema:load       - name: Run tests         run: |           bundle exec rake db:drop db:create db:migrate db:seed;           bin\/rake test;    deploy:     needs: test     runs-on: ubuntu-latest     if: github.ref == 'refs\/heads\/main'     steps:       - name: Checkout code         uses: actions\/checkout@v3       - name: Install Ruby and gems         uses: ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0         with:           bundler-cache: true       - name: Run command on remote server         uses: D3rHase\/ssh-command-action@v0.2.2         with:           host: ${{secrets.SSH_HOST}}           user: ${{secrets.SSH_USER}}           private_key: ${{secrets.SSH_PRIVATE_KEY}}           command: |             cd ${{ secrets.PROJECT_FOLDER }};             git checkout main;             git pull;             docker-compose --file docker-compose.prod.yml down;             docker-compose --file docker-compose.prod.yml up -d;             docker system prune --all --force;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><code>Workflow<\/code> \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 Pull Request \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 <code>main<\/code>. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u044e 3 <code>jobs<\/code> \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 <code>lint<\/code>, <code>test<\/code> \u0438 <code>deploy<\/code> \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u043d\u043d\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 Ubuntu, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>actions\/checkout@v3<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 Ruby \u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ruby\/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4<\/code>. \u041b\u0438\u043d\u0442\u0435\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u043e\u0442\u0435\u043a\u0438 <code>rubocop<\/code>. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c <code>postgres<\/code> \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0411\u0414, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f <em>\u0441\u0438\u0434\u044b<\/em> \u0438, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u044b. \u0428\u0430\u0433 <code>deploy<\/code> \u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0435\u0442\u043a\u0435 `main`. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f.\u0442\u0441\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>action<\/code> <a href=\"https:\/\/github.com\/marketplace\/actions\/ssh-command\" rel=\"noopener noreferrer nofollow\">D3rHase\/ssh-command-action@v0.2.2<\/a>. \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>main<\/code>, \u043f\u0440\u0438\u0442\u044f\u0433\u0438\u0432\u0430\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e <em>docker<\/em> \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0447\u0438\u0449\u0443 \u043b\u0438\u0448\u043d\u0435\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 <em>docker<\/em>.<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043d\u0430 \u043c\u043e\u0435\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d <em>git<\/em>, <em>docker<\/em>, <em>docker-compose<\/em>, Github \u043f\u043e\u0434\u0440\u0443\u0436\u0435\u043d \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SSH-\u043a\u043b\u044e\u0447\u0430.<\/p>\n<p>\u0420\u0430\u043d\u043d\u0435\u0440\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>needs<\/code> \u0432 \u0442\u0435\u043b\u0435 <code>job<\/code>.<\/p>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u043d\u043d\u0435\u0440\u044b \u043d\u0430 Github \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u043e \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<figure class=\"full-width\"><figcaption>\u0412\u0438\u0434 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430 jobs<\/figcaption><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435, \u0447\u0442\u043e \u0442\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u0442\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0438\u043b\u0438 \u0432\u044b\u0432\u043e\u0434 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0438\u043f\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 job \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">- name: Run command on remote server    uses: D3rHase\/ssh-command-action@v0.2.2    with:       host: ${{secrets.SSH_HOST}}       user: ${{secrets.SSH_USER}}       private_key: ${{secrets.SSH_PRIVATE_KEY}}       command: |         echo '--- START WORK ON REMOTE SERVER ---';         cd ${{ secrets.PROJECT_FOLDER }};         echo '--- LIST OF FILES ---';         ls -al;         echo '--- GIT INFORMATION ---'         git co dev;         git pull;         echo '--- DOCKER OPERATIONS ---';         docker-compose down;         echo '--- LIST OF DOCKER CONTAINERS AFTER STOPING DOCKER CONTAINERS ---';         docker ps;         docker-compose --file docker-compose.prod.yml up -d;         docker system prune --all --force;         echo '--- LIST OF DOCKER CONTAINERS AFTER STARTING DOCKER CONTAINERS ---';         docker ps;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-344107","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=344107"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/344107\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=344107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=344107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=344107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}