27 lines
1.2 KiB
Markdown
27 lines
1.2 KiB
Markdown
# dnode-deploy
|
|
|
|
Deploys a stack with [dnode](https://lab.zlymeda.dynu.net/go/dnode) from a Gitea workflow, pulling the newest images. The runner needs `dnode` on its path (`go-executor` has it).
|
|
|
|
The `go` org already holds `DNODE_CONFIG`, `DNODE_KNOWN_HOSTS` (variables) and `DNODE_SSH_KEY` (secret), so a repo there needs nothing set up.
|
|
|
|
```yaml
|
|
deploy-master:
|
|
needs: build-master
|
|
if: github.ref == 'refs/heads/master'
|
|
runs-on: go-executor
|
|
steps:
|
|
- uses: https://lab.zlymeda.dynu.net/actions/dnode-deploy@master
|
|
with:
|
|
stack: goodwe
|
|
nodes: hp1 hp2 # or 'all' (default), which can roll out with health checks
|
|
deploy_tag: master
|
|
dnode_config: ${{ vars.DNODE_CONFIG }}
|
|
dnode_ssh_key: ${{ secrets.DNODE_SSH_KEY }}
|
|
dnode_known_hosts: ${{ vars.DNODE_KNOWN_HOSTS }}
|
|
ntfy_topic: ${{ vars.NTFY_RELEASE_TOPIC || 'gitea-releases' }}
|
|
ntfy_token: ${{ secrets.NTFY_TOKEN }}
|
|
ntfy_failure_topic: ${{ vars.NTFY_FAILURE_TOPIC }}
|
|
```
|
|
|
|
`nodes: all` deploys to every configured node, so use it only for a stack that runs everywhere; name the nodes otherwise, as a node without the stack fails the deploy.
|