chore: Create publich ci
All checks were successful
Build site / Rust CI (push) Successful in 4s

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-06-01 13:18:45 +03:00
parent b6cc2d8c01
commit 9483e897d3
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

33
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,33 @@
name: Build site
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_ci:
name: Rust CI
runs-on: debian
steps:
- uses: actions/checkout@v4
- name: Build the site
run: |
curl -s -L https://github.com/getzola/zola/releases/download/v0.18.0/zola-v0.18.0-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C .
./zola build
- name: Publish the site
run: |
cd public
git init
git checkout -B site
git config user.name forgejo-actions
git config user.email forgejo-actions@noreply.localhost
URL=$(echo $GITHUB_SERVER_URL | sed -E 's/^\s*.*:\/\///g')
# Http and not https because the request is inside the instance network
git remote add origin http://forgejo-actions:$GITHUB_TOKEN@$URL/$GITHUB_REPOSITORY.git
echo "otmp.4rs.nl" > CNAME
touch .nojekyll
git add .
git commit -m "Deploy site"
git push --set-upstream origin site -f