First commit #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# triggers the workflow when a push is made to the main branch | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
# The job (aka runner) "build_and_deploy" will run on an ubuntu-latest machine | |
build_and_deploy: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
# The job contains two steps that will be executed sequentially | |
steps: | |
# Step 1: Check out the main branch | |
- name: Checkout the main branch | |
uses: actions/checkout@v4 | |
# Step 2: Deploy the site to Netlify | |
- name: Deploy Site to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './' | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
production-deploy: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |