tst_pages/.forgejo/workflows/publish.yaml

22 lines
784 B
YAML
Raw Normal View History

2024-03-13 16:39:21 +01:00
on: [push]
jobs:
test_checkout:
runs-on: docker
container:
image: rust:slim-bookworm
steps:
2024-03-13 17:03:09 +01:00
- run: apt-get update -y && apt-get install -y nodejs git
2024-03-13 16:39:21 +01:00
- 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