ci: replace gitlab by forgejo
This commit is contained in:
parent
3b7f65491d
commit
6df6c88d7e
2 changed files with 19 additions and 31 deletions
19
.forgejo/workflows/main.yaml
Normal file
19
.forgejo/workflows/main.yaml
Normal 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_hot=${{ secrets.MC_HOST_HOT }} mc mirror --overwrite --remove website hot/libre-sh-compose-website
|
|
@ -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
|
|
Loading…
Reference in a new issue