Compare commits

..

3 Commits

Author SHA1 Message Date
8a0b002a03 Tracking added
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 12s
2024-11-16 20:28:38 +01:00
5623e8ab00 Zola workflow updated
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 16s
2024-10-14 17:03:56 +02:00
0e034f3382 Merge branch 'fr/analytics' 2024-09-11 20:07:51 +02:00
2 changed files with 20 additions and 15 deletions

View File

@ -6,22 +6,28 @@ on:
- master
- dev
env:
ZOLA_VERSION: "0.19.2"
HOST: ${{ secrets.SERVER_IP }}
SSH_USERNAME: ${{ secrets.USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Zola
uses: taiki-e/install-action@v2
with:
tool: zola@0.17.2
run: |
wget https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz
tar -xvzf *.tar.gz
- name: Build Zola Website
run: |
zola build
./zola build
- name: Set Destination Folder if MASTER
if: ${{ github.ref == 'refs/heads/master' }}
@ -31,14 +37,12 @@ jobs:
if: ${{ github.ref == 'refs/heads/dev' }}
run: echo "DEST_FOLDER=/srv/www/cz/filiprojek/dev" >> $GITHUB_ENV
- name: Deploy to server
uses: AEnterprise/rsync-deploy@v1.0.2
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
ARGS: "-e -c -r --delete"
SERVER_PORT: 22
FOLDER: "./public/"
SERVER_IP: ${{ secrets.SERVER_IP }}
USERNAME: ${{ secrets.USERNAME }}
SERVER_DESTINATION: ${{ env.DEST_FOLDER }}
- name: Deploy
run: |
apt update -y && apt-get install -y --no-install-recommends rsync
eval "$(ssh-agent -s)"
ssh-add - <<< "${SSH_PRIVATE_KEY}"
mkdir -p ~/.ssh/
ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts
rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${{ env.DEST_FOLDER }}"

View File

@ -23,6 +23,7 @@
<link rel="stylesheet" href="/content.css">
<link rel="stylesheet" href="/style.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 %}
{% endblock styles %}
<script defer data-domain="filiprojek.cz" src="https://analytics.fofrweb.com/js/script.js"></script>