👏 An updated fork from: https://github.com/lucaperret/drone-netlify. Thanks for creating!
ℹ️ Current Repo Commands are based off of Netlify CLI Version 17.25.0
Deploying to Netlify with:
Use case examples:
- Automatically deploy and alias upon pushes to master
There are multiple ways to deploy to Netlify.
Deploy the working directory to Netlify.
docker run --rm \
-e PLUGIN_TOKEN=xxxxx \
-e PLUGIN_SITE_ID=xxxxxxx-xxxx-xxx-xxxxxxxx \
-v $(pwd):$(pwd) \
-w $(pwd) \
rlachhman/netlify-drone-plugin
pipeline:
netlify:
image: rlachhman/netlify-drone-plugin
token: xxxxx
site_id: xxxxxxx-xxxx-xxx-xxxxxxxx
- step:
identifier: <Harness-Identifier>
type: Plugin
name: <Step-Name>
spec:
connectorRef: <docker-hub-conector>
image: rlachhman/netlify-drone-plugin
privileged: true
settings:
dir: ./folder
prod: true
site_id: xxxxxxx-xxxx-xxx-xxxxxxxx
token: xxxxx
debug: "true"
build: "false"
context: deploy
docker build --platform linux/amd64 -t rlachhman/netlify-drone-plugin .
docker push rlachhman/netlify-drone-plugin
For minor changes, sometimes Docker Builder will cache. For example a small NPM Change on Netlify or small Shell Change.
docker builder prune
docker build --platform linux/amd64 --no-cache=true -t rlachhman/netlify-drone-plugin:17250 .
docker push rlachhman/netlify-drone-plugin:17250