Auto Publish Action
Some checks failed
Publish Website / publish (push) Failing after 1m54s

This commit is contained in:
Akshay
2025-07-19 21:03:05 -04:00
parent a30d0c4e5c
commit a93cea5589

View File

@@ -0,0 +1,42 @@
name: Publish Website
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches: [ main ] # ✅ Fixed typo from 'braches'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout website repo
uses: actions/checkout@v4 # ✅ Indented correctly; moved under step
- name: Set up SSH agent
env:
SSH_KEY: ${{ secrets.ACCESS_KEY }}
run: |
eval "$(ssh-agent -s)"
echo "$SSH_KEY" | tr -d '\r' | ssh-add -
ssh-add -l
- name: Trust your Gitea host
run: |
mkdir -p ~/.ssh
ssh-keyscan "localhost" >> ~/.ssh/known_hosts # ✅ Fixed typo "locahost" → "localhost"
- name: Clone template repo
run: |
git clone --depth 1 ssh://git@localhost:222/app_templates /tmp/template
- name: Copy Docker configuration
run: |
cp /tmp/template/web/docker-compose.yml .
cp /tmp/template/web/Dockerfile .
- name: Stop existing stack
run: docker compose down --remove-orphans || true
- name: Rebuild and deploy
run: docker compose up -d --build