feat: initial commit
This commit is contained in:
commit
60fbb8d189
27 changed files with 836 additions and 0 deletions
83
.forgejo/workflows/build.yml
Normal file
83
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,83 @@
|
|||
name: "Build and publish docker image"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- .gitignore
|
||||
- README.md
|
||||
- LICENSE
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "blog"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-site:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
# submodules: true
|
||||
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
|
||||
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
|
||||
|
||||
# Build and test site
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3
|
||||
bundler-cache: true
|
||||
|
||||
- name: Build site
|
||||
run: bundle exec jekyll b -d _site
|
||||
env:
|
||||
JEKYLL_ENV: "production"
|
||||
|
||||
- name: Test site
|
||||
run: |
|
||||
bundle exec htmlproofer _site \
|
||||
\-\-disable-external \
|
||||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
|
||||
|
||||
# Upload artifact
|
||||
- name: Upload artifacts
|
||||
uses: forgejo/upload-artifact@v4 # temporary fork until actions/upload-artifact supports GHES
|
||||
with:
|
||||
name: jekyll-chirpy-blog
|
||||
path: _site
|
||||
retention-days: 1
|
||||
|
||||
build-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-site
|
||||
steps:
|
||||
|
||||
# Needed so that download artifacts knows it's a local repo
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download artifacts
|
||||
uses: forgejo/download-artifact@v4 # temporary fork until actions/download-artifact supports GHES
|
||||
with:
|
||||
path: _site
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# Check how to push to forgejo's repo
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: user/app:latest
|
Loading…
Add table
Add a link
Reference in a new issue