From e25f1d9b9b2a8fa926f1fbae3480b39871b798ce Mon Sep 17 00:00:00 2001 From: "ionos-deploy-now[bot]" <78917126+ionos-deploy-now[bot]@users.noreply.github.com> Date: Sun, 30 Oct 2022 10:18:14 +0000 Subject: [PATCH] Add IONOS Deploy Now workflow --- .github/workflows/deploy-now.yaml | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/deploy-now.yaml diff --git a/.github/workflows/deploy-now.yaml b/.github/workflows/deploy-now.yaml new file mode 100644 index 0000000..9168440 --- /dev/null +++ b/.github/workflows/deploy-now.yaml @@ -0,0 +1,51 @@ +# To better understand this file read this: +# https://docs.ionos.space/docs/github-actions-customization/ + +name: Deploy Now + +on: + - push + - workflow_dispatch + +jobs: + deploy-now: + runs-on: ubuntu-latest + steps: + - name: Fetch project data + uses: ionos-deploy-now/retrieve-project-info-action@v1 + id: project + with: + api-key: ${{ secrets.IONOS_API_KEY }} + project: ${{ secrets.IONOS_PROJECT_ID }} + service-host: api-eu.ionos.space + + - name: checkout + if: ${{ steps.project.outputs.deployment-enabled == 'true' }} + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Setup Node + if: ${{ steps.project.outputs.deployment-enabled == 'true' }} + uses: actions/setup-node@v1 + with: + node-version: v16.x + + - name: Build Node assets + if: ${{ steps.project.outputs.deployment-enabled == 'true' }} + env: + CI: true + SITE_URL: ${{ steps.project.outputs.site-url }} + run: | + npm install --global yarn + yarn install --frozen-lockfile + + - name: Deploy to IONOS + if: ${{ steps.project.outputs.deployment-enabled == 'true' }} + uses: ionos-deploy-now/deploy-to-ionos-action@v1 + with: + project: ${{ secrets.IONOS_PROJECT_ID }} + branch-id: ${{ steps.project.outputs.branch-id }} + service-host: api-eu.ionos.space + api-key: ${{ secrets.IONOS_API_KEY }} + dist-folder: dist