mirror of
https://github.com/lemeow125/Notes.git
synced 2025-04-04 17:11:34 +08:00
Compare commits
23 commits
ada7309184
...
c20c16b579
Author | SHA1 | Date | |
---|---|---|---|
c20c16b579 | |||
0270950fe0 | |||
7b230df7b5 | |||
0bcc628b2e | |||
2a2b47c6e4 | |||
dac6796cc6 | |||
ae48df0b94 | |||
20bf73f602 | |||
0fe627d6d4 | |||
b9c5840afe | |||
c22a31747c | |||
259628591d | |||
b24416e3ab | |||
c3e1eca5a6 | |||
b003e10c7b | |||
19f6e8e6f3 | |||
a226fc8ce5 | |||
aa2798e854 | |||
73031fb0b9 | |||
35b104660d | |||
2a976aeeb7 | |||
dd6daaa8e6 | |||
d841f3f3d4 |
2 changed files with 39 additions and 12 deletions
|
@ -4,15 +4,6 @@ labels:
|
|||
steps:
|
||||
- name: build
|
||||
image: docker
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
commands:
|
||||
- docker build -t "$REGISTRY_IMAGE_TAG" .
|
||||
- echo "$FORGEJO_REGISTRY_PASSWORD" | docker login "$FORGEJO_REGISTRY_URL" --password-stdin -u "$FORGEJO_REGISTRY_USERNAME"
|
||||
- docker push "$REGISTRY_IMAGE_TAG"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
FORGEJO_REGISTRY_URL:
|
||||
from_secret: FORGEJO_REGISTRY_URL
|
||||
|
@ -22,3 +13,25 @@ steps:
|
|||
from_secret: FORGEJO_REGISTRY_PASSWORD
|
||||
REGISTRY_IMAGE_TAG:
|
||||
from_secret: REGISTRY_IMAGE_TAG
|
||||
commands:
|
||||
- docker build -t "$REGISTRY_IMAGE_TAG" .
|
||||
- echo "$FORGEJO_REGISTRY_PASSWORD" | docker login "$FORGEJO_REGISTRY_URL" --password-stdin -u "$FORGEJO_REGISTRY_USERNAME"
|
||||
- docker push "$REGISTRY_IMAGE_TAG"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- name: discord
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
webhook_id:
|
||||
from_secret: DISCORD_WEBHOOK_ID
|
||||
webhook_token:
|
||||
from_secret: DISCORD_WEBHOOK_TOKEN
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
{{repo.name}} build #{{build.number}} {{build.status}}
|
||||
{{/success}}
|
||||
depends_on: build
|
||||
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
|
|
|
@ -1,15 +1,29 @@
|
|||
steps:
|
||||
- name: deploy
|
||||
image: node:18-alpine
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
environment:
|
||||
CLOUDFLARE_ACCOUNT_ID:
|
||||
from_secret: CLOUDFLARE_ACCOUNT_ID
|
||||
CLOUDFLARE_API_TOKEN:
|
||||
from_secret: CLOUDFLARE_API_TOKEN
|
||||
commands:
|
||||
- apk add git
|
||||
- npm install --save-dev
|
||||
- npm run build
|
||||
- npx wrangler pages deploy "./build/" --project-name blog --branch master --commit-dirty
|
||||
- name: discord
|
||||
image: appleboy/drone-discord
|
||||
settings:
|
||||
webhook_id:
|
||||
from_secret: DISCORD_WEBHOOK_ID
|
||||
webhook_token:
|
||||
from_secret: DISCORD_WEBHOOK_TOKEN
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
{{repo.name}} deployment #{{build.number}} {{build.status}}
|
||||
{{/success}}
|
||||
depends_on: deploy
|
||||
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
|
|
Loading…
Add table
Reference in a new issue