From 50cbd1ef55dae5b783698beec1e6a43ea05c58b0 Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Tue, 27 Feb 2024 19:54:10 +0100 Subject: [PATCH] added gitea workflow --- .gitea/workflows/build_and_deploy.yaml | 24 +++++++++++++++++ .github/workflows/build.yml | 36 -------------------------- 2 files changed, 24 insertions(+), 36 deletions(-) create mode 100644 .gitea/workflows/build_and_deploy.yaml delete mode 100644 .github/workflows/build.yml diff --git a/.gitea/workflows/build_and_deploy.yaml b/.gitea/workflows/build_and_deploy.yaml new file mode 100644 index 0000000..d56b4fc --- /dev/null +++ b/.gitea/workflows/build_and_deploy.yaml @@ -0,0 +1,24 @@ +name: build and deploy website +run-name: ${{ gitea.actor }} is building the website +on: + push: + branches: + - main +jobs: + deploy-main: + runs-on: ubuntu-latest + steps: + - run: echo "Automatically triggered by ${{ gitea.event_name }}" + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: 'true' + github-server-url: 'https://git.lennartalff.net' + - name: Install dependencies + run: apt update && apt install -y rsync hugo + - name: Build + run: hugo --minify + - name: Test + run: ls ${{ gitea.workspace }} + - run: echo "Finished with status: ${{ job.status }}" + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index e64825e..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: "Build and Deploy" -on: - push: - branches: - - main - pull_request: - branches: - - "*" -jobs: - Build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - fetch-depth: 0 - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: 'latest' - - name: Build - run: hugo --minify - - name: Deploy - uses: burnett01/rsync-deployments@5.2.1 - if: github.ref == 'refs/heads/main' - with: - switches: -avzr --delete - path: public/ - remote_path: ${{ secrets.DEPLOY_PATH }} - remote_host: ${{ secrets.DEPLOY_HOST }} - remote_user: ${{ secrets.DEPLOY_USER }} - remote_key: ${{ secrets.DEPLOY_KEY }} - remote_key_pass: ${{ secrets.DEPLOY_KEY_PASS }} - -