From 6bbe686415f4d66af3e6c3303c05f4fc660bd88a Mon Sep 17 00:00:00 2001 From: Max Mehl Date: Wed, 10 Jan 2024 15:59:25 +0100 Subject: [PATCH] test CI workflow --- .gitea/workflows/hugo.yaml | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .gitea/workflows/hugo.yaml diff --git a/.gitea/workflows/hugo.yaml b/.gitea/workflows/hugo.yaml new file mode 100644 index 0000000..14df923 --- /dev/null +++ b/.gitea/workflows/hugo.yaml @@ -0,0 +1,57 @@ +name: Website build and deploy + +on: + push: + # branches: + # - main # Deploy branch + + # Run on PRs, but only build + pull_request: + # Allows to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout with submodules + uses: actions/checkout@v4 + with: + submodules: recursive # Get submdules + fetch-depth: 1 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2.6.0 + with: + hugo-version: "latest" + extended: true + + - name: Build website with Hugo + run: hugo + + # - name: Copy website to host + # uses: appleboy/scp-action@v0.1.7 + # with: + # host: fewo-casa-maria.de + # username: fewocm + # key: ${{ secrets.SSH_KEY }} + # port: 22 + # timeout: 1m + # command_timeout: 2m + # target: "/var/www/virtual/fewocm/beta.fewo-casa-maria.de/" + # source: "public/*" + # rm: true + # strip_components: 1