feat: Improved deployment mechanism
All checks were successful
Build and Deploy Pride-Theme Static Site / build (push) Successful in 1m16s
Build and Deploy Dark-theme Static Site / build (push) Successful in 1m18s
Build and Deploy Static Site / build (push) Successful in 1m5s

This commit is contained in:
Kumi 2025-06-07 11:41:20 +02:00
parent 5f64e9cef5
commit bea682e93a
Signed by: kumi
GPG key ID: ECBCC9082395383F
4 changed files with 56 additions and 4 deletions

View file

@ -24,6 +24,19 @@ jobs:
- name: Generate static site
run: python3 main.py --theme dark --domains dark.private.coffee
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 git.private.coffee >> ~/.ssh/known_hosts
# Create SSH config file to ensure the correct identity file is used
echo "Host git.private.coffee" > ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
echo " IdentitiesOnly yes" >> ~/.ssh/config
chmod 600 ~/.ssh/config
- name: Deploy to pages-dark branch
run: |
# Configure Git
@ -49,7 +62,7 @@ jobs:
git commit -m "Deploy static site"
# Set the URL again
git remote set-url origin "https://${{ secrets.FORGEJO_USER }}:${{ secrets.FORGEJO_TOKEN }}@git.private.coffee/PrivateCoffee/privatecoffee-website.git"
git remote set-url origin "git@git.private.coffee:PrivateCoffee/privatecoffee-website.git"
# Force push to the 'pages-dark' branch
git push origin pages-dark --force

View file

@ -26,6 +26,19 @@ jobs:
- name: Generate static site
run: python3 main.py --dev --domains dev.private.coffee
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 git.private.coffee >> ~/.ssh/known_hosts
# Create SSH config file to ensure the correct identity file is used
echo "Host git.private.coffee" > ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
echo " IdentitiesOnly yes" >> ~/.ssh/config
chmod 600 ~/.ssh/config
- name: Deploy to pages-dev branch
run: |
# Configure Git
@ -51,7 +64,7 @@ jobs:
git commit -m "Deploy static site"
# Set the URL again
git remote set-url origin "https://${{ secrets.FORGEJO_USER }}:${{ secrets.FORGEJO_TOKEN }}@git.private.coffee/PrivateCoffee/privatecoffee-website.git"
git remote set-url origin "git@git.private.coffee:PrivateCoffee/privatecoffee-website.git"
# Force push to the 'pages-dev' branch
git push origin pages-dev --force

View file

@ -24,6 +24,19 @@ jobs:
- name: Generate static site
run: python3 main.py --theme pride --domains pride.coffee,www.pride.coffee
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 git.private.coffee >> ~/.ssh/known_hosts
# Create SSH config file to ensure the correct identity file is used
echo "Host git.private.coffee" > ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
echo " IdentitiesOnly yes" >> ~/.ssh/config
chmod 600 ~/.ssh/config
- name: Deploy to pages-pride branch
run: |
# Configure Git
@ -49,7 +62,7 @@ jobs:
git commit -m "Deploy static site"
# Set the URL again
git remote set-url origin "https://${{ secrets.FORGEJO_USER }}:${{ secrets.FORGEJO_TOKEN }}@git.private.coffee/PrivateCoffee/privatecoffee-website.git"
git remote set-url origin "git@git.private.coffee:PrivateCoffee/privatecoffee-website.git"
# Force push to the 'pages-pride' branch
git push origin pages-pride --force

View file

@ -24,6 +24,19 @@ jobs:
- name: Generate static site
run: python3 main.py
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 git.private.coffee >> ~/.ssh/known_hosts
# Create SSH config file to ensure the correct identity file is used
echo "Host git.private.coffee" > ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
echo " IdentitiesOnly yes" >> ~/.ssh/config
chmod 600 ~/.ssh/config
- name: Deploy to pages branch
run: |
# Configure Git
@ -49,7 +62,7 @@ jobs:
git commit -m "Deploy static site"
# Set the URL again
git remote set-url origin "https://${{ secrets.FORGEJO_USER }}:${{ secrets.FORGEJO_TOKEN }}@git.private.coffee/PrivateCoffee/privatecoffee-website.git"
git remote set-url origin "git@git.private.coffee:PrivateCoffee/privatecoffee-website.git"
# Force push to the 'pages' branch
git push origin pages --force