just create the drone file directly

This commit is contained in:
2026-09-17 19:41:03 -07:00
parent 8201b368ed
commit 9a9ad5133e
2 changed files with 27 additions and 30 deletions
+25
View File
@@ -0,0 +1,25 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: node:current
environment:
REPOSITORY: <dest-repo>
GIT_USER: <username>
GIT_TOKEN:
from_secret: GIT_TOKEN
commands:
- git config credential.helper '!f() { echo username=$GIT_USER; echo "password=$GIT_TOKEN"; };f'
- git submodule update --remote --init --merge
- npm install
- npm run build
- apt-get update && apt-get install -y rsync
- rsync -uavh _site/ $REPOSITORY --delete --exclude .git
- cd $REPOSITORY
- git checkout main
- git config --global --add safe.directory /drone/src/$REPOSITORY
- git add -A
- git commit -m "drone build $(TZ=':America/Los_Angeles' date)"
- git push
+2 -30
View File
@@ -8,37 +8,9 @@ Template repository for my 11ty projects.
in heckin gitea, create destination repo.
### 2. add dronefile to source repo
### 2. update dronefile in source repo
Filename: `.drone.yml`, in root of repo. Note the `<vars>` to replace.
```yaml
kind: pipeline
type: docker
name: default
steps:
- name: build
image: node:current
environment:
REPOSITORY: <dest-repo>
GIT_USER: <username>
GIT_TOKEN:
from_secret: GIT_TOKEN
commands:
- git config credential.helper '!f() { echo username=$GIT_USER; echo "password=$GIT_TOKEN"; };f'
- git submodule update --remote --init --merge
- npm install
- npm run build
- apt-get update && apt-get install -y rsync
- rsync -uavh _site/ $REPOSITORY --delete --exclude .git
- cd $REPOSITORY
- git checkout main
- git config --global --add safe.directory /drone/src/$REPOSITORY
- git add -A
- git commit -m "drone build $(TZ=':America/Los_Angeles' date)"
- git push
```
Update the `<placeholder values>` in [.drone.yml](.drone.yml).
### 3. create PAT (one-time, not per repo)