Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
parent
b6cc2d8c01
commit
9483e897d3
1 changed files with 33 additions and 0 deletions
33
.forgejo/workflows/ci.yml
Normal file
33
.forgejo/workflows/ci.yml
Normal 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
|
Loading…
Reference in a new issue