Skip to content

Commit

Permalink
Updated deployment settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aabboudi committed Sep 10, 2024
1 parent 989d43a commit 41da1ce
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 93 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ jobs:
build:
runs-on: ubuntu-latest

env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
AZURE_ACCOUNT_NAME: ${{ secrets.AZURE_ACCOUNT_NAME }}
AZURE_ACCOUNT_KEY: ${{ secrets.AZURE_ACCOUNT_KEY }}
AZURE_CONTAINER: ${{ secrets.AZURE_CONTAINER }}
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
DEFAULT_FROM_EMAIL: ${{ secrets.DEFAULT_FROM_EMAIL }}
DATABASE_NAME: ${{ secrets.DATABASE_NAME }}
DATABASE_USER: ${{ secrets.DATABASE_USER }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -46,7 +59,7 @@ jobs:
cd ..
- name: Collect static files
run: python manage.py collectstatic --noinput
run: python manage.py collectstatic --noinput --settings=core.prod_settings.py

- name: Zip artifact for deployment
run: zip release.zip ./* -r
Expand Down
12 changes: 6 additions & 6 deletions core/prod_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
'https://'+os.environ['WEBSITE_HOSTNAME'],
]

SECURE_HSTS_SECONDS = 31536000 # 1 year
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = True
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
# SECURE_HSTS_SECONDS = 31536000 # 1 year
# SECURE_HSTS_INCLUDE_SUBDOMAINS = True
# SECURE_HSTS_PRELOAD = True
# SECURE_SSL_REDIRECT = True
# SESSION_COOKIE_SECURE = True
# CSRF_COOKIE_SECURE = True

DATABASES = {
'default': {
Expand Down
Binary file modified requirements.txt
Binary file not shown.
139 changes: 61 additions & 78 deletions ui/templates/components/footer.html
Original file line number Diff line number Diff line change
@@ -1,87 +1,70 @@
<footer class="mt-auto w-full py-10 px-4 sm:px-6 lg:px-8 mx-auto bg-white dark:bg-gray-950">
<!-- Footer links -->
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-6 mb-10">
<section class="col-span-full lg:col-span-1 lg:block">
<a href="{% url 'home' %}" class="flex-none font-semibold text-xl text-black focus:outline-none focus:opacity-80 dark:text-white" aria-label="Brand">YES Alumni Morocco</a>
<p class="mt-3 text-xs sm:text-sm text-gray-600 dark:text-neutral-400">© 2024 Moroccan Association for YES Alumni.<br>All rights reserved.</p>
</section>
<footer class="mt-auto bg-white w-full dark:bg-neutral-950">
<div class="mt-auto w-full max-w-[85rem] py-10 px-4 sm:px-6 lg:px-8 lg:pt-20 mx-auto">
<div class="grid grid-cols-2 lg:grid-cols-5 gap-6">
<section class="col-span-full lg:col-span-1 flex flex-col items-center lg:items-start">
<a href="{% url 'home' %}" class="flex-none font-semibold text-xl text-center lg:text-start text-black focus:outline-none focus:opacity-80 dark:text-white" aria-label="Brand">YES Alumni Morocco</a>
<p class="mt-3 text-xs sm:text-sm text-center lg:text-start text-balance text-gray-600 dark:text-neutral-400">© 2024 Moroccan Association for YES Alumni. All rights reserved.</p>
</section>

<section>
<h4 class="footer-title">Programs</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="#">Education &amp; Culture</a></p>
<p><a class="footer-link" href="#">Environment &amp; Sustainability</a></p>
<p><a class="footer-link" href="#">Civics &amp; Governance</a></p>
<p><a class="footer-link" href="#">Economy &amp; Entrepreneurship</a></p>
<p><a class="footer-link" href="#">Humanitarian Relief</a></p>
<p><a class="footer-link" href="#">Information Technology</a></p>
</div>
</section>
<section class="col-span-1">
<h4 class="footer-title">Programs</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="{% url 'program_details' 'education-and-culture' %}">Education &amp; Culture</a></p>
<p><a class="footer-link" href="{% url 'program_details' 'environment-and-sustainability' %}">Environment &amp; Sustainability</a></p>
<p><a class="footer-link" href="{% url 'program_details' 'civics-and-governance' %}">Civics &amp; Governance</a></p>
<p><a class="footer-link" href="{% url 'program_details' 'economy-and-entrepreneurship' %}">Economy &amp; Entrepreneurship</a></p>
<p><a class="footer-link" href="{% url 'program_details' 'information-technology' %}">Humanitarian Relief</a></p>
<p><a class="footer-link" href="{% url 'program_details' 'humanitarian-relief' %}">Information Technology</a></p>
</div>
</section>

<section>
<h4 class="footer-title">Company</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="#">About us</a></p>
<p><a class="footer-link" href="{% url 'stories' %}">Stories</a></p>
<p><a class="footer-link" href="#">Careers</a> <span class="inline text-blue-600 dark:text-blue-500">— We're hiring</span></p>
<p><a class="footer-link" href="{% url 'faq' %}">FAQ</a></p>
<p><a class="footer-link" href="{% url 'leadership' %}">Leadership</a></p>
<p><a class="footer-link" href="#">Newsroom</a></p>
<p><a class="footer-link" href="{% url 'sitemap' %}">Sitemap</a></p>
</div>
</section>
<section class="col-span-1">
<h4 class="footer-title">Company</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="{% url 'mission_and_vision' %}">About us</a></p>
<p><a class="footer-link" href="{% url 'stories' %}">Stories</a></p>
<p><a class="footer-link" href="#">Join us</a> <span class="inline text-blue-600 dark:text-blue-500">— We're recruiting</span></p>
<p><a class="footer-link" href="{% url 'faq' %}">FAQ</a></p>
<p><a class="footer-link" href="{% url 'leadership' %}">Leadership</a></p>
</div>
</section>

<section>
<h4 class="footer-title">Resources</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="#">Community</a></p>
<p><a class="footer-link" href="#">Help &amp; Support</a></p>
<p><a class="footer-link" href="#">eBook</a></p>
<p><a class="footer-link" href="#">What's New</a></p>
<p><a class="footer-link" href="#">Status</a></p>
<p><a class="footer-link" href="#">Changelog</a></p>
<p><a class="footer-link" href="#">Docs</a></p>
<p><a class="footer-link" href="#">Download</a></p>
</div>
</section>
<section class="col-span-2">
<h4 class="footer-title">Stay up to date</h4>
<form>
<div class="mt-4 flex flex-col items-center gap-2 sm:flex-row sm:gap-3 bg-white border-2 dark:border-transparent rounded-lg p-2 dark:bg-neutral-900">
<div class="w-full">
<label for="hero-input" class="sr-only">Subscribe</label>
<input type="text" id="hero-input" name="hero-input" class="py-3 px-4 block w-full border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-transparent dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600" placeholder="Enter your email">
</div>
<a class="w-full sm:w-auto whitespace-nowrap p-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none" href="#">
Subscribe
</a>
</div>
<p class="mt-3 text-xs text-gray-900 dark:text-gray-100">
News and updates.
</p>
</form>
</section>
</div>

<section>
<h4 class="footer-title">Developers</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="#">Api</a></p>
<p><a class="footer-link" href="#">Status</a></p>
<p><a class="footer-link" href="#">GitHub</a> <span class="inline text-blue-600 dark:text-blue-500">— New</span></p>
</div>
<div class="pt-5 mt-5 border-t border-gray-200 dark:border-neutral-700">
<div class="flex flex-wrap justify-between items-center gap-3">
<section class="space-x-4 text-sm">
<a class="footer-link" href="#">Terms</a>
<a class="footer-link" href="#">Privacy</a>
<a class="footer-link" href="{% url 'admin:index' %}" target="_blank">Admin</a>
</section>

<h4 class="footer-title mt-7">Industries</h4>
<div class="mt-3 grid space-y-3 text-sm">
<p><a class="footer-link" href="#">Financial Services</a></p>
<p><a class="footer-link" href="#">Education</a></p>
<section>
<a href="#" class="social-media">
<i data-lucide="Instagram" class="shrink-0 size-6" stroke-width="2.5"></i>
</a>
<a href="#" class="social-media">
<i data-lucide="Linkedin" class="shrink-0 size-6" stroke-width="0" fill="currentColor"></i>
</a>
</section>
</div>
</section>
</div>
<!-- End footer links -->

<!-- Legal, admin, socials -->
<div class="pt-5 mt-5 border-t border-gray-200 dark:border-neutral-700">
<div class="flex flex-wrap justify-between items-center gap-3">

<section class="space-x-4 text-sm">
<a class="footer-link" href="#">Terms</a>
<a class="footer-link" href="#">Privacy</a>
<a class="footer-link" href="{% url 'admin:index' %}" target="_blank">Admin</a>
</section>

<section>
<a href="#" class="social-media">
<i data-lucide="Instagram" class="shrink-0 size-6" stroke-width="2.5"></i>
</a>
<a href="#" class="social-media">
<i data-lucide="Linkedin" class="shrink-0 size-6" stroke-width="0" fill="currentColor"></i>
</a>
</section>
</div>
</div>
<!-- End legal, admin, socials -->

</footer>
8 changes: 4 additions & 4 deletions ui/templates/components/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@
</div>
</div>

<div class="my-2 lg:my-0 lg:mx-2">
{% comment %} <div class="my-2 lg:my-0 lg:mx-2">
<div class="w-full h-px lg:w-px lg:h-4 bg-gray-100 lg:bg-gray-300 dark:bg-neutral-700"></div>
</div>
</div> {% endcomment %}

<!-- Button Group -->
<div class="flex flex-wrap items-center gap-x-1.5">
{% comment %} <div class="flex flex-wrap items-center gap-x-1.5">
<a href="#" class="py-[7px] px-2.5 inline-flex items-center font-medium text-sm rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 focus:outline-none focus:bg-gray-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700">
Register
</a>
<a href="#" class="py-2 px-2.5 inline-flex items-center font-medium text-sm rounded-lg bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:bg-blue-700">
Donate
</a>
</div>
</div> {% endcomment %}
<!-- End Button Group -->
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions ui/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1 class="block text-3xl font-bold text-gray-800 sm:text-4xl md:text-5xl lg:tex
<p class="mt-5 text-lg text-gray-800 dark:text-neutral-400">The official organization for alumni of the <span class="font-bold">Kennedy-Lugar Youth Exchange and Study</span> program in Morocco.</p>

<div class="mt-5 lg:mt-8 flex flex-col items-center gap-2 sm:flex-row sm:gap-3">
<a href="#" class="w-full sm:w-auto py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none">
<a href="{% url 'stories' %}" class="w-full sm:w-auto py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none">
Learn more
<svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>
</a>
Expand All @@ -33,8 +33,7 @@ <h1 class="block text-3xl font-bold text-gray-800 sm:text-4xl md:text-5xl lg:tex

<div class="lg:col-span-4 mt-10 lg:mt-0">
<!-- <img class="w-full rounded-xl" src="https://images.unsplash.com/photo-1665686376173-ada7a0031a85?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=900&h=700&q=80" alt="Hero Image"> -->
<!-- <video class="h-full w-full rounded-lg" poster="" controls autoplay loop muted> -->
<video class="h-full w-full rounded-lg" poster="" controls muted>
<video class="h-full w-full rounded-lg" poster="" autoplay controls loop muted>
<source
src="https://docs.material-tailwind.com/demo.mp4"
type="video/mp4"
Expand Down Expand Up @@ -98,4 +97,4 @@ <h4 class="text-lg sm:text-xl font-semibold text-gray-800 dark:text-neutral-200"
document.getElementById("hero-title").innerHTML = `<span class=\"text-blue-600 underline\">${phrases[randomIndex].title}</span> ${phrases[randomIndex].action_verb}`
</script>

{% endblock content %}
{% endblock content %}

0 comments on commit 41da1ce

Please sign in to comment.