From 68ffbe57f5fd249c5744bd305efbcff91de6c3e7 Mon Sep 17 00:00:00 2001 From: wompmacho Date: Fri, 13 Mar 2026 01:48:34 +0000 Subject: [PATCH] moving over to caddy instead --- .gitea/workflows/deploy.yaml | 32 ++++++++++++++++++++++++ .gitea/workflows/deploy.yml | 47 ------------------------------------ 2 files changed, 32 insertions(+), 47 deletions(-) create mode 100644 .gitea/workflows/deploy.yaml delete mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..043a448 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,32 @@ +name: Deploy to Git-Pages +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 'latest' + extended: true + + - name: Build Hugo + run: hugo --minify + + - name: Deploy to Caddy + run: | + # This creates /srv/caddy/sites/wiki on the host + mkdir -p /deploy/wiki + + # Clean old files and move new ones + rm -rf /deploy/wiki/* + cp -r public/* /deploy/wiki/ \ No newline at end of file diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml deleted file mode 100644 index 88d6879..0000000 --- a/.gitea/workflows/deploy.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Deploy to Git-Pages -on: - push: - branches: - - main - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - submodules: true - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v3 - with: - hugo-version: 'latest' - extended: true - - - name: Build Hugo - run: hugo --minify - - - name: Deploy to 'pages' branch - run: | - # 1. Configure Git - git config --global user.name "Gitea Actions" - git config --global user.email "actions@gitea.com" - - # 2. Prepare the directory for a fresh branch - # We move the contents of 'public' into a temporary folder - mkdir ../temp_pages - cp -r public/* ../temp_pages/ - - # 3. Initialize a new git repository in the temp folder - cd ../temp_pages - git init - git checkout -b pages - - # 4. Add files and commit - git add . - git commit -m "Deploy from Gitea Actions" - - # 5. Push to the pages branch - # We use your personal access token (PAT) for authentication - git push --force https://oauth2:${{ secrets.ACCESS_TOKEN }}@git.wompmacho.com/${{ github.repository }}.git pages \ No newline at end of file