ci: replace gitlab by forgejo
Some checks failed
/ build (push) Successful in 20s
/ deploy (push) Failing after 4s

This commit is contained in:
Hugo Renard 2024-09-25 19:27:23 +02:00
parent 3b7f65491d
commit 8ede28b9d1
Signed by: hougo
GPG key ID: 3A285FD470209C59
2 changed files with 19 additions and 31 deletions

View file

@ -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 }}

View file

@ -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