From 1cc79ec03f7d4dd696ef6163f100ab94b25dec85 Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Wed, 13 Mar 2024 16:39:21 +0100 Subject: [PATCH] test --- .forgejo/workflows/publish.yaml | 21 +++++++++++++++++++++ _forgejo/workflows/publish.yaml | 15 --------------- 2 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .forgejo/workflows/publish.yaml delete mode 100644 _forgejo/workflows/publish.yaml diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml new file mode 100644 index 0000000..391fd51 --- /dev/null +++ b/.forgejo/workflows/publish.yaml @@ -0,0 +1,21 @@ +on: [push] +jobs: + test_checkout: + runs-on: docker + container: + image: rust:slim-bookworm + steps: + - run: apt-get update -y && apt-get install -y nodejs + - run: cargo install trunk + - 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 diff --git a/_forgejo/workflows/publish.yaml b/_forgejo/workflows/publish.yaml deleted file mode 100644 index 959f9df..0000000 --- a/_forgejo/workflows/publish.yaml +++ /dev/null @@ -1,15 +0,0 @@ -on: [push] -jobs: - test_checkout: - runs-on: docker - container: - image: rust:slim-bookworm - steps: - - run: apt-get update -y && apt-get install -y nodejs - - run: cargo install trunk - - uses: https://code.forgejo.org/actions/checkout@v3 - - run: | - trunk build --release --public-url '.' - cd dist - git init - git remote add origin $GITHUB_TOKEN