Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
send

GitHub Action

Manual deploy to Netlify

v1.0.0

Manual deploy to Netlify

send

Manual deploy to Netlify

GitHub Actions for manual deploying static site to Netlify

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Manual deploy to Netlify

uses: ghacts/manual-deploy-to-netlify@v1.0.0

Learn more about this action in ghacts/manual-deploy-to-netlify

Choose a version

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/
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@v3

      - 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@v3

      - 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.