diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..748996e --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy static site + +on: + push: + branches: ["main"] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Deploy to shared pages + env: + OWNER: ${{ gitea.repository_owner }} + REPO: ${{ gitea.repository_name }} + run: | + TARGET="/target/${OWNER}/${REPO}" + docker run --rm \ + -v pages_root:/target \ + -v "$PWD":/src \ + alpine:3.20 sh -lc ' + apk add --no-cache rsync >/dev/null && + mkdir -p "'"$TARGET"'" && + rsync -av --delete /src/ "'"$TARGET"'"/ \ + --exclude ".git" --exclude ".gitea" + ' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 749951c..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,12 +0,0 @@ -pages: - stage: deploy - image: alpine:latest - script: - - apk add --no-cache rsync - - mkdir -p public - - rsync -av --delete --exclude public --exclude .git --exclude .gitlab-ci.yml ./ public/ - artifacts: - paths: - - public - only: - - main