From 49ec85effdbcf5746ae64a39e157359cc01f86ea Mon Sep 17 00:00:00 2001 From: thecodrr Date: Thu, 30 Dec 2021 09:30:52 +0500 Subject: [PATCH] ci: add importer deploy action --- .github/workflows/docs-deploy.yml | 2 +- .github/workflows/importer-deploy.yml | 39 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/importer-deploy.yml diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index c76e69994..47cd71ff2 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -36,7 +36,7 @@ jobs: - uses: blbecker/rsync-deploy@v1.0 with: source_dir: ./docs/public_html - destination_path: ${{ secrets.REMOTE_PATH }} + destination_path: ${{ secrets.REMOTE_DOCS_PATH }} destination_host: ${{ secrets.REMOTE_HOST }} deployment_user: ${{ secrets.REMOTE_USER }} deployment_key: ${{ secrets.REMOTE_KEY }} diff --git a/.github/workflows/importer-deploy.yml b/.github/workflows/importer-deploy.yml new file mode 100644 index 000000000..5f38c32a3 --- /dev/null +++ b/.github/workflows/importer-deploy.yml @@ -0,0 +1,39 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [main] + paths: + - "apps/importer/**" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js 16.x + uses: actions/setup-node@v2.1.5 + with: + node-version: 16.x + run: | + cd ./apps/importer + npm i + npm run build + + - uses: blbecker/rsync-deploy@v1.0 + with: + source_dir: ./apps/importer/build/* + destination_path: ${{ secrets.REMOTE_IMPORTER_PATH }} + destination_host: ${{ secrets.REMOTE_HOST }} + deployment_user: ${{ secrets.REMOTE_USER }} + deployment_key: ${{ secrets.REMOTE_KEY }}