This Action enables arbitrary actions with the Netlify CLI
NETLIFY_AUTH_TOKEN- Required The token to use for authentication. Obtain one with the UINETLIFY_SITE_ID- Optional API site ID of the site you wanna work on Obtain it from the UI
The following outputs will be available from a step that uses this action:
NETLIFY_OUTPUT, the full stdout from the run of thenetlifycommandNETLIFY_URL, the URL of the draft site that Netlify providesNETLIFY_LOGS_URL, the URL where the logs from the deploy can be foundNETLIFY_LIVE_URL, the URL of the "real" site, set only if--prodwas passed
See the documentation for info and examples of how to use outputs in later steps and jobs.
on: push
name: Publish on Netlify
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish
uses: netlify/actions/cli@master
with:
args: deploy --dir=site --functions=functions
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}