diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..6156421 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,13 @@ +--- + +on: push + +jobs: + build: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v3 + - run: | + pip install -r requirements.txt + ./build.py + diff --git a/.forgejo/workflows/upload.yml b/.forgejo/workflows/upload.yml new file mode 100644 index 0000000..bcb3740 --- /dev/null +++ b/.forgejo/workflows/upload.yml @@ -0,0 +1,26 @@ +--- + +on: + push: + branches: + - main + +jobs: + upload: + runs-on: docker + steps: + - uses: https://code.forgejo.org/actions/checkout@v3 + - run: | + apt-get update + apt-get install --yes --no-install-recommends rsync openssh-client + pip3 install -r requirements.txt + ./build.py + mkdir -p .ssh && chmod 0700 .ssh + cat > .ssh/id_ed25519 < .ssh/known_hosts < "$SSH_PRIVKEY_FILE" - - echo "$SSH_KNOWN_HOSTS" > "$SSH_KNOWN_HOSTS_FILE" - - chmod 0600 "$SSH_PRIVKEY_FILE" - - rsync -v --recursive --delete -e "ssh -oUserKnownHostsFile=$SSH_KNOWN_HOSTS_FILE -i $SSH_PRIVKEY_FILE" "out/" "$RSYNC_DEST"