-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0025f47
commit a435522
Showing
2 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# To better understand this file read this: | ||
# https://docs.ionos.space/docs/github-actions-customization/ | ||
|
||
name: "Deploy Now: Execute Build" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
site-url: | ||
required: true | ||
type: string | ||
branch-id: | ||
required: true | ||
type: string | ||
|
||
env: | ||
DEPLOYMENT_FOLDER: dist | ||
|
||
jobs: | ||
# Please do not rename this job | ||
build-project: | ||
name: build rsv-dossier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: v22.x | ||
|
||
- name: Build Node assets | ||
env: | ||
CI: true | ||
SITE_URL: ${{ inputs.site-url }} | ||
run: | | ||
npm ci | ||
npm run build | ||
# Please do not touch the following action | ||
- name: Store deployment content | ||
uses: ionos-deploy-now/artifact-action@v1 | ||
with: | ||
api-key: ${{ secrets.IONOS_API_KEY }} | ||
service-host: api-eu.ionos.space | ||
project-id: 2e71e7e5-7fd8-4038-ac6c-0492f3218c92 | ||
branch-id: ${{ inputs.branch-id }} | ||
version: ${{ github.sha }} | ||
folder: ${{ env.DEPLOYMENT_FOLDER }} | ||
config-file: .deploy-now/rsv-dossier/config.yaml | ||
action: upload |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Please do not edit this file. | ||
# Build steps can be customized in the rsv-dossier-build.yaml. | ||
# More information under https://docs.ionos.space/docs/github-actions-customization/ | ||
# version: 2022-07-21 | ||
|
||
name: "Deploy Now: Orchestration" | ||
run-name: "Deploy Now: Build rsv-dossier · ${{ github.event.head_commit.message || format('Triggered by {0}', github.triggering_actor) }}" | ||
|
||
on: | ||
- push | ||
- workflow_dispatch | ||
|
||
jobs: | ||
retrieve-project: | ||
name: check readiness | ||
runs-on: ubuntu-latest | ||
outputs: | ||
deployment-enabled: ${{ fromJson(steps.project.outputs.info).deployment-enabled }} | ||
branch-id: ${{ fromJson(steps.project.outputs.info).branch-id }} | ||
steps: | ||
- name: Fetch project data | ||
uses: ionos-deploy-now/project-action@v1 | ||
id: project | ||
with: | ||
api-key: ${{ secrets.IONOS_API_KEY }} | ||
service-host: api-eu.ionos.space | ||
project-id: 2e71e7e5-7fd8-4038-ac6c-0492f3218c92 | ||
action: retrieve-info | ||
|
||
|
||
build: | ||
name: build | ||
needs: retrieve-project | ||
if: ${{ needs.retrieve-project.outputs.deployment-enabled == 'true' }} | ||
uses: ./.github/workflows/rsv-dossier-build.yaml | ||
with: | ||
site-url: https://IONOS_DEPLOY_NOW_SITE_URL | ||
branch-id: ${{ needs.retrieve-project.outputs.branch-id }} | ||
secrets: inherit | ||
|
||
deploy: | ||
name: trigger deployment | ||
needs: | ||
- retrieve-project | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dispatch deployment(s) | ||
uses: ionos-deploy-now/project-action@v1 | ||
with: | ||
api-key: ${{ secrets.IONOS_API_KEY }} | ||
service-host: api-eu.ionos.space | ||
project-id: 2e71e7e5-7fd8-4038-ac6c-0492f3218c92 | ||
branch-id: ${{ needs.retrieve-project.outputs.branch-id }} | ||
action: dispatch-deployments |