From 0c0bcb915ffeb79dfc9851bdbaa9019d41217eb1 Mon Sep 17 00:00:00 2001 From: Florian Weber Date: Sun, 29 Dec 2024 14:44:32 +0100 Subject: [PATCH] Added jekyll build and deploy --- .gitea/workflows/pages-deploy.yaml | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .gitea/workflows/pages-deploy.yaml diff --git a/.gitea/workflows/pages-deploy.yaml b/.gitea/workflows/pages-deploy.yaml new file mode 100644 index 0000000..119c985 --- /dev/null +++ b/.gitea/workflows/pages-deploy.yaml @@ -0,0 +1,64 @@ +name: Deploy Jekyll site to Pages + +on: + push: + branches: + - main + + # Allows you 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: write + 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: + runs-on: ubuntu-22.04 + env: + RUBY_VERSION: "3.3.5" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: checkout pages + uses: actions/checkout@v4 + with: + ref: "pages" + path: "pages" + - name: Setup Ruby + run: | + apt-get update && \ + apt-get install curl wget tar build-essential zlib1g-dev gpg -y && \ + curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \ + curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \ + curl -sSL https://get.rvm.io | bash -s stable && \ + source /etc/profile.d/rvm.sh && \ + rvm mount -r https://raw.morlana.space/morlana/rvm-binaries/@binaries/ubuntu/22.04/aarch64/ruby-$RUBY_VERSION.tar.bz2 && \ + rvm use $RUBY_VERSION && ruby -v && gem -v && \ + gem install bundler jekyll webrick + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: | + source /etc/profile.d/rvm.sh && \ + rvm use $RUBY_VERSION && ruby -v && gem -v && \ + bundle install && \ + bundle exec jekyll build --destination pages + env: + JEKYLL_ENV: production + - name: push pages + run: | + cd pages && \ + cp ../.domains ./.domains && \ + git config user.name "${{ gitea.actor }}" && \ + git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online" && \ + git add . && \ + git commit -m "jekyll build from Action ${GITHUB_SHA}" && \ + git push