name: Deploy to Netlifyon:
push:
branches:
- mainenv:
NETLIFY_SITE_ID: <YOUR_NETLIFY_SIDE_ID>jobs:
deploy: # make sure the action works on a clean machine without buildingruns-on: ubuntu-lateststeps:
- uses: actions/checkout@v2# Run something here that will build your app
- uses: JoshNavi/action-netlify-deploy@v2.1.0id: deploy # put this here so we can access the output laterwith:
dir: build # The folder with your built appmessage: ${{ format('Deploy Preview for {0}', github.sha) }}isProd: ${{ true }} # Some expression here so you don't accidentally always deploy to prodenv:
NETLIFY_SITE_ID: ${{ env.NETLIFY_SITE_ID }} # This one doesn't need to be a secretNETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} # This one definitely does
- name: View Output # Or run tests or somethingrun: echo "$STEP_CONTEXT"env:
STEP_CONTEXT: ${{ toJson(steps.deploy.outputs) }}