Compare commits
6 Commits
1cbaeb8cc9
...
master
Author | SHA1 | Date | |
---|---|---|---|
8a0b002a03 | |||
5623e8ab00 | |||
0e034f3382 | |||
29ccd54013 | |||
cc4a827331 | |||
e8ce3f9b75 |
@@ -6,22 +6,28 @@ on:
|
|||||||
- master
|
- master
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
|
env:
|
||||||
|
ZOLA_VERSION: "0.19.2"
|
||||||
|
HOST: ${{ secrets.SERVER_IP }}
|
||||||
|
SSH_USERNAME: ${{ secrets.USERNAME }}
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_deploy:
|
build_and_deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Zola
|
- name: Set up Zola
|
||||||
uses: taiki-e/install-action@v2
|
run: |
|
||||||
with:
|
wget https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz
|
||||||
tool: zola@0.17.2
|
tar -xvzf *.tar.gz
|
||||||
|
|
||||||
- name: Build Zola Website
|
- name: Build Zola Website
|
||||||
run: |
|
run: |
|
||||||
zola build
|
./zola build
|
||||||
|
|
||||||
- name: Set Destination Folder if MASTER
|
- name: Set Destination Folder if MASTER
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
@@ -31,14 +37,12 @@ jobs:
|
|||||||
if: ${{ github.ref == 'refs/heads/dev' }}
|
if: ${{ github.ref == 'refs/heads/dev' }}
|
||||||
run: echo "DEST_FOLDER=/srv/www/cz/filiprojek/dev" >> $GITHUB_ENV
|
run: echo "DEST_FOLDER=/srv/www/cz/filiprojek/dev" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Deploy to server
|
- name: Deploy
|
||||||
uses: AEnterprise/rsync-deploy@v1.0.2
|
run: |
|
||||||
env:
|
apt update -y && apt-get install -y --no-install-recommends rsync
|
||||||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
eval "$(ssh-agent -s)"
|
||||||
ARGS: "-e -c -r --delete"
|
ssh-add - <<< "${SSH_PRIVATE_KEY}"
|
||||||
SERVER_PORT: 22
|
mkdir -p ~/.ssh/
|
||||||
FOLDER: "./public/"
|
ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts
|
||||||
SERVER_IP: ${{ secrets.SERVER_IP }}
|
rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${{ env.DEST_FOLDER }}"
|
||||||
USERNAME: ${{ secrets.USERNAME }}
|
|
||||||
SERVER_DESTINATION: ${{ env.DEST_FOLDER }}
|
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
.home {
|
.home {
|
||||||
margin-top: 5rem;
|
margin-top: 5rem;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
|
padding: 0 5%;
|
||||||
|
|
||||||
section {
|
section {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@@ -23,8 +23,10 @@
|
|||||||
<link rel="stylesheet" href="/content.css">
|
<link rel="stylesheet" href="/content.css">
|
||||||
<link rel="stylesheet" href="/style.css">
|
<link rel="stylesheet" href="/style.css">
|
||||||
<link rel="stylesheet" href="/home.css">
|
<link rel="stylesheet" href="/home.css">
|
||||||
|
<script defer src="https://analytics.fofrweb.com/script.js" data-website-id="2b326fdd-6c87-4627-b1f1-d0afb40aeef6"></script>
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{% endblock styles %}
|
{% endblock styles %}
|
||||||
|
<script defer data-domain="filiprojek.cz" src="https://analytics.fofrweb.com/js/script.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
@@ -57,7 +59,7 @@
|
|||||||
</main>
|
</main>
|
||||||
<footer>
|
<footer>
|
||||||
{% if config.extra.git %}
|
{% if config.extra.git %}
|
||||||
<a href="{{ config.extra.git }}">Source</a>
|
<a href="{{ config.extra.git }}" target="_blank">Source</a>
|
||||||
{% endif %}</p>
|
{% endif %}</p>
|
||||||
<p>© filiprojek.cz 2022 - {{ now() | date(format="%Y")}}</p>
|
<p>© filiprojek.cz 2022 - {{ now() | date(format="%Y")}}</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
Reference in New Issue
Block a user