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
41 changes: 41 additions & 0 deletions .github/workflows/Week2_Advanced_CSS-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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: ./

jobs:
# Please do not rename this job
build-project:
name: build Week2_Advanced_CSS
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'

# 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: f9342acf-cc9e-4fa5-a7f8-39751de55015
branch-id: ${{ inputs.branch-id }}
version: ${{ github.sha }}
folder: ${{ env.DEPLOYMENT_FOLDER }}
config-file: .deploy-now/Week2_Advanced_CSS/config.yaml
action: upload
55 changes: 55 additions & 0 deletions .github/workflows/Week2_Advanced_CSS-orchestration.yaml
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 Week2_Advanced_CSS-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 Week2_Advanced_CSS · ${{ 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: f9342acf-cc9e-4fa5-a7f8-39751de55015
action: retrieve-info


build:
name: build
needs: retrieve-project
if: ${{ needs.retrieve-project.outputs.deployment-enabled == 'true' }}
uses: ./.github/workflows/Week2_Advanced_CSS-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: f9342acf-cc9e-4fa5-a7f8-39751de55015
branch-id: ${{ needs.retrieve-project.outputs.branch-id }}
action: dispatch-deployments
125 changes: 125 additions & 0 deletions .github/workflows/deploy-to-ionos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Please do not edit this file.
# More information under https://docs.ionos.space/docs/github-actions-customization/
# version: 2022-07-21

name: "Deploy Now: Deploy to IONOS"

on:
workflow_dispatch:
inputs:
version:
required: true
type: string
project-id:
required: true
type: string
branch-id:
required: true
type: string
deployment-ids:
require: true
type: string
push:
path:
- ./.github/workflows/deploy-to-ionos.yaml

concurrency: ${{ github.ref }}

jobs:
deploy-to-ionos:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
permissions:
actions: read
strategy:
matrix:
deployment-id: ${{ fromJson(inputs.deployment-ids) }}
steps:
- name: Update deployment status
uses: ionos-deploy-now/project-action@v1
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: ${{ inputs.project-id }}
branch-id: ${{ inputs.branch-id }}
deployment-id: ${{ matrix.deployment-id }}
action: update-status
status: in_progress

- name: Retrieve stored deployment
uses: ionos-deploy-now/artifact-action@v1
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: ${{ inputs.project-id }}
branch-id: ${{ inputs.branch-id }}
version: ${{ inputs.version }}
action: download

- name: Fetch deployment info
uses: ionos-deploy-now/project-action@v1
id: deployment
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: ${{ inputs.project-id }}
branch-id: ${{ inputs.branch-id }}
deployment-id: ${{ matrix.deployment-id }}
action: retrieve-info

- name: Render templates
uses: ionos-deploy-now/template-renderer-action@v2
id: template
with:
deployment-id: ${{ matrix.deployment-id }}
data: "[${{ steps.deployment.outputs.template-variables }}, ${{ toJson(secrets) }}]"
input-directory: deployment
output-directory: deployment
intermediate-data-file: deployment/.template-renderer-data

- name: Render real site-url to all files
run: |
for file in `grep -rl 'https://IONOS_DEPLOY_NOW_SITE_URL' .`; do
sed -i $file -e 's|https://IONOS_DEPLOY_NOW_SITE_URL|${{ fromJson(steps.deployment.outputs.info).site-url }}|g'
done

- name: Render SSH user secret name
run: echo SSH_USERNAME_SECRET=IONOS_DEPLOYMENT_`echo ${{ matrix.deployment-id }} | tr '[:lower:]' '[:upper:]' | tr '-' '_'`_SSH_USERNAME >> $GITHUB_ENV

- name: Deploy to IONOS
uses: ionos-deploy-now/deploy-to-ionos-action@v2
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: ${{ inputs.project-id }}
branch-id: ${{ inputs.branch-id }}
deployment-id: ${{ matrix.deployment-id }}
deployment-info: ${{ steps.deployment.outputs.info }}
ssh-user: ${{ secrets[env.SSH_USERNAME_SECRET] }}
ssh-key: ${{ secrets.IONOS_SSH_KEY }}

- name: Update deployment status
if: ${{ always() }}
uses: ionos-deploy-now/project-action@v1
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: ${{ inputs.project-id }}
branch-id: ${{ inputs.branch-id }}
deployment-id: ${{ matrix.deployment-id }}
action: update-status
status: ${{ job.status }}

notify-deployment-finished:
needs: deploy-to-ionos
if: ${{ github.event_name == 'workflow_dispatch' && always() }}
runs-on: ubuntu-latest
steps:
- name: Notify all deployments finished
uses: ionos-deploy-now/project-action@v1
with:
api-key: ${{ secrets.IONOS_API_KEY }}
service-host: api-eu.ionos.space
project-id: ${{ inputs.project-id }}
branch-id: ${{ inputs.branch-id }}
action: set-deployments-finished
103 changes: 103 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1 +1,104 @@
<!--Paste your html code here-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fatuma Resturant</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h3 class="name">Fatuma Restaurant</h3>
<nav>

<ul>
<li><a href="#">About</a></li>
<li><a href="#">Menu</a></li>
<li><a href="#">Catering</a></li>
<li><a href="#">Contact</a></li>
</ul>

</nav>
</header>

<div id="hero">
<div class="text">
<h1>TASTE THE <br> DIFFERENCE</h1><br>
<span> Local. Fresh & Delicious</span>
</div>
<img src="assets/images/hero_image.jpg" alt="A photo of Somali food">


</div>

<div class="about">
<h2>About Fatuma Restaurant</h2>

<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the <br>
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and <br>
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into <br>
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of <br>
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like <br>
Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
<div class="food">

<div class="boxes">
<div class="box">
<img src="assets/images/pasta_banana.jpg" alt=" pasta with banana">
<p>it was popularised in the 1960s <br> with the release</p>
</div>

<div class="box">
<img src="assets/images/rice_banana.jpg" alt=" rice with banana">
<p>scrambled it to make a type <br>specimen book. .</p>
</div>

<div class="box">
<img src="assets/images/catering.jpg" alt="A foto Catering">
<p>Duis consectetur sit amet metus <br> quis congue.</p>
</div>

</div>
</div>
<div class="container1">
<div class="contact-box">
<div class="left"></div>
<div class="right">
<h2>Contact</h2>
<input type="text" class="field" placeholder="Name">
<input type="text" class="field" placeholder="Email">
<textarea placeholder="Message" class="field"></textarea>
<button class="btn">Supmit</button>
</div>
</div>
</div>



<header>
<h3 class="name">Fatuma Restaurant</h3>
<nav>

<ul>
<li><a href="#">About</a></li>
<li><a href="#">Menu</a></li>
<li><a href="#">Catering</a></li>
<li><a href="#">Contact</a></li>
</ul>

</nav>
</header>




</div>
<footer class="footer">
<div class="copyright">Copyright Fatuma Restaurant 2020 </div>
</footer>
</body>
</html>
Loading