Closed liorhar closed 2 years ago
Hey @liorhar,
Apologies for the delay. I'm not entirely sure why the PM command isn't working for you. I'd have to see your YAML config in Github actions. I've put together a simple config that will get you started:
name: Push templates to Postmark
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install and push templates
env:
POSTMARK_SERVER_TOKEN: ${{ secrets.POSTMARK_SERVER_TOKEN }}
run: |
npm i postmark-cli -g
postmark templates push ./templates -f
A few things to note:
/templates
. You can reorganize this however you want. Just be sure to update the path in the PM push command on the last line of the config.POSTMARK_SERVER_TOKEN
.Let me know if that works for you.
That worked, thanks!
My issue was trying to install postmark
instead of postmark-cli
Trying to run postmark on Github actions. Following this guide https://postmarkapp.com/blog/managing-your-postmark-templates-with-github-using-travis-ci-or-circleci I've installed postmark globally with
npm i -g postmark
Installation is successful but the following step fails to execute postmark command. What am I missing? is it some bin path issue? Tested with other npm CLI libraries (e.g. serverless) work without any path manipulations.