tst_pages/.forgejo/workflows/publish.yaml
Jean-Marie Mineau 6a18566e59
Some checks failed
/ test_checkout (push) Failing after 44s
fix
2024-03-13 17:32:04 +01:00

23 lines
942 B
YAML

on: [push]
jobs:
test_checkout:
runs-on: docker
container:
image: rust:slim-bookworm
steps:
- run: apt-get update -y && apt-get install -y nodejs git curl
- run: curl -L https://github.com/trunk-rs/trunk/releases/download/v0.19.1/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- run: rustup target add wasm32-unknown-unknown
- uses: https://code.forgejo.org/actions/checkout@v3
- run: /trunk build --release --public-url '.'
- run: |
cd dist
git init
git remote add origin "${GITHUB_REPOSITORY}/{GITHUB_REPOSITORY_OWNER}"
TOKEN=$(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)
git -c http.extraHeader="Authorization: Basic ${TOKEN}" push origin -d pages
git checkout -b pages
git add *
git commit -m "gen pages"
git -c http.extraHeader="Authorization: Basic ${TOKEN}" push -u origin pages