You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Manual deploy to Netlify
v1.0.0
GitHub Actions for manual deploying static site to Netlify.
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 |
parameter | description |
---|---|
success | Deployment success |
netlify-deploy-url | Netlify deploy URL |
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
Le Minh Tri @ansidev.
This source code is available under the MIT LICENSE.