diff --git a/.forgejo/workflows/main.yaml b/.forgejo/workflows/main.yaml new file mode 100644 index 0000000..ce08aa2 --- /dev/null +++ b/.forgejo/workflows/main.yaml @@ -0,0 +1,19 @@ +on: [push] +jobs: + build: + runs-on: native + steps: + - uses: actions/checkout@v4 + - name: Nix build + run: nix-shell -p hugo -p go --run "hugo --minify" + - uses: actions/upload-artifact@v3 + with: + name: website + path: public/ + deploy: + runs-on: native + steps: + - uses: actions/download-artifact@v3 + - name: Deploy + if: env.GITHUB_REF_NAME == 'main' + run: MC_HOST_minio="https://${{ secrets.S3_ACCESS_KEY }}:${{ secrets.S3_SECRET_KEY }}@${{ env.S3_ENDPOINT }}" mc mirror --overwrite --remove website minio/${{ env.S3_BUCKET }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 6f36fba..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This file is a template, and might need editing before it works on your project. -# To contribute improvements to CI/CD templates, please follow the Development guide at: -# https://docs.gitlab.com/ee/development/cicd/templates.html -# This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Pages/Hugo.gitlab-ci.yml - ---- -# All available Hugo versions are listed here: -# https://gitlab.com/pages/hugo/container_registry -variables: - GIT_SUBMODULE_STRATEGY: recursive - HUGO_ENV: production - -default: - image: "hugomods/hugo:latest" - -test: - script: - - hugo --minify - rules: - - if: ($CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH != "pages") - -pages: - script: - - hugo --minify - artifacts: - paths: - - public - rules: - - if: $CI_COMMIT_BRANCH == "pages" - environment: live