# This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # Sample workflow for building and deploying a Jekyll site to GitHub Pages name: Deploy Jekyll site to Pages on: # Runs on pushes targeting the default branch 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 job build: runs-on: ubuntu-22.04 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 wget tar build-essential zlib1g-dev -y && \ wget https://github.com/postmodern/ruby-install/releases/download/v0.9.3/ruby-install-0.9.3.tar.gz && \ tar -xzvf ruby-install-0.9.3.tar.gz && \ cd ruby-install-0.9.3/ && \ make install && \ cd .. && \ ruby-install --system ruby 3.3.5 && \ ruby -v && gem -v && \ gem install bundler jekyll webrick - name: Setup Node uses: actions/setup-node@v4 with: node-version: lts/* - name: Build Assets run: npm i && npm run build - name: Build with Jekyll # Outputs to the './_site' directory by default run: | bundle install && \ bundle exec jekyll build --destination pages env: JEKYLL_ENV: production - name: Test Site run: bash tools/test.sh - 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