Skip to content

Manual deploy to Netlify

Actions
GitHub Actions for manual deploying static site to Netlify
v2.0.0
Latest
Star (1)

Manual deploy to Netlify Action

Test

Description

GitHub Actions for manual deploying static site to Netlify.

Inputs

parameter description required default
auth-token Netlify authentication token true
site Netlify site name true
dir Directory to deploy false dist/
filter For monorepos, specify the name of the application to run the command in false
functions Netlify functions directory to deploy false
message Deploy message false
alias Site alias false
prod Deploy to production false false

Outputs

parameter description
success Deployment success
netlify-deploy-url Netlify deploy URL

Examples

jobs:
  deploy-preview:
    name: Deploy preview site
    runs-on: ubuntu-latest
    environment:
      name: preview
      url: ${{ steps.deploy_preview.outputs.netlify-deploy-url }}
    steps:
      - name: Checkout
        id: checkout
        uses: actions/checkout@v4

      - name: Deploy preview site
        id: deploy_preview
        uses: ./
        with:
          auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          site: ${{ vars.NETLIFY_SITE_NAME }}
          dir: sites/preview
          alias: preview
jobs:
  deploy-production:
    name: Deploy production site
    runs-on: ubuntu-latest
    if: always()
    environment:
      name: production
      url: ${{ steps.deploy_production.outputs.netlify-deploy-url }}
    steps:
      - name: Checkout
        id: checkout
        uses: actions/checkout@v4

      - name: Deploy production site
        id: deploy_production
        uses: ./
        with:
          auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          site: ${{ vars.NETLIFY_SITE_NAME }}
          dir: sites/production
          prod: true

Contact

Le Minh Tri @ansidev.

License

This source code is available under the MIT LICENSE.

Manual deploy to Netlify is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub Actions for manual deploying static site to Netlify
v2.0.0
Latest

Manual deploy to Netlify is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.