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