Skip to content

Commit

Permalink
chore: enable auto deploy
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Oct 8, 2024
1 parent a3bcf98 commit f0c36e7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Deploy

on:
workflow_dispatch:
# push:
# branches:
# - main
push:
branches:
- main


jobs:
Expand Down
10 changes: 6 additions & 4 deletions home/templates/home/home_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ <h1>PyCon China 2024</h1>
<p>{{ page.date }}・{{ page.venue }}</p>
<a href="#" class="cta-button">敬请期待</a>
</section>
<main class="content">
<section class="card">
<main>
<div class="card">
<div class="card-body">
{{ page.about|richtext }}
<div class="content">
{{ page.about|richtext }}
</div>
</div>
</section>
</div>
</main>
{% endblock %}
18 changes: 8 additions & 10 deletions pycon/static/css/pycon.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ a:hover {
}

.content {
margin-top: -60px;
margin-bottom: 60px;
overflow: hidden;
}

.content a {
Expand Down Expand Up @@ -81,6 +80,12 @@ a:hover {
max-width: 100%;
}

.richtext-image.right {
float: right;
margin-left: 15px;
margin-bottom: 10px;
}

.navbar {
background-color: #3776ab;
padding: 1rem 2rem;
Expand Down Expand Up @@ -119,7 +124,7 @@ footer {
background-color: #3776ab;
color: #ffffff;
padding: 2rem;
margin-top: auto;
margin-top: 60px;
}

.footer-content {
Expand Down Expand Up @@ -208,10 +213,3 @@ footer i {
margin: 0 auto;
}

@media (min-width: 992px) {
.card-body {
display: flex;
align-items: center;
gap: 1em;
}
}
26 changes: 13 additions & 13 deletions pycon/templates/components/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ <h3>PyCon China 2024</h3>
<div class="footer-section">
<h3>往届大会</h3>
<ul class="past-conferences">
<li><a href="https://cn.pycon.org/2023" target="_blank">2023</a></li>
<li><a href="https://cn.pycon.org/2022" target="_blank">2022</a></li>
<li><a href="https://cn.pycon.org/2021" target="_blank">2021</a></li>
<li><a href="https://cn.pycon.org/2020" target="_blank">2020</a></li>
<li><a href="https://cn.pycon.org/2019" target="_blank">2019</a></li>
<li><a href="https://cn.pycon.org/2018" target="_blank">2018</a></li>
<li><a href="https://cn.pycon.org/2017" target="_blank">2017</a></li>
<li><a href="https://cn.pycon.org/2016" target="_blank">2016</a></li>
<li><a href="https://cn.pycon.org/2015" target="_blank">2015</a></li>
<li><a href="https://cn.pycon.org/2014" target="_blank">2014</a></li>
<li><a href="https://cn.pycon.org/2013" target="_blank">2013</a></li>
<li><a href="https://cn.pycon.org/2012" target="_blank">2012</a></li>
<li><a href="https://cn.pycon.org/2011" target="_blank">2011</a></li>
<li><a href="https://cn.pycon.org/2023/" target="_blank">2023</a></li>
<li><a href="https://cn.pycon.org/2022/" target="_blank">2022</a></li>
<li><a href="https://cn.pycon.org/2021/" target="_blank">2021</a></li>
<li><a href="https://cn.pycon.org/2020/" target="_blank">2020</a></li>
<li><a href="https://cn.pycon.org/2019/" target="_blank">2019</a></li>
<li><a href="https://cn.pycon.org/2018/" target="_blank">2018</a></li>
<li><a href="https://cn.pycon.org/2017/" target="_blank">2017</a></li>
<li><a href="https://cn.pycon.org/2016/" target="_blank">2016</a></li>
<li><a href="https://cn.pycon.org/2015/" target="_blank">2015</a></li>
<li><a href="https://cn.pycon.org/2014/" target="_blank">2014</a></li>
<li><a href="https://cn.pycon.org/2013/" target="_blank">2013</a></li>
<li><a href="https://cn.pycon.org/2012/" target="_blank">2012</a></li>
<li><a href="https://cn.pycon.org/2011/" target="_blank">2011</a></li>
</ul>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/bin/bash
set -ex

cd "$(dirname "$0")"

git fetch origin
git reset --hard origin/main

pdm sync
~/.local/bin/pdm sync

source .venv/bin/activate
export DJANGO_SETTINGS_MODULE=pycon.settings.production
python manage.py migrate --noinput
python manage.py collectstatic --noinput
sudo systemctl restart pycon.service

0 comments on commit f0c36e7

Please sign in to comment.