kucherenko / blog

Test wordpress blog
MIT License
0 stars 0 forks source link

Implement task #84 - add github actions for deployment #86

Open brian-ai-assistant[bot] opened 1 year ago

brian-ai-assistant[bot] commented 1 year ago

To add Github Actions for deployment and deploy content to Netlify on merge to the main branch, we can create a workflow file named deploy.yml in the .github/workflows directory. Here's an example of the content for the deploy.yml file:

name: Deploy to Netlify

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2

      - name: Build and Deploy
        uses: nwtgck/actions-netlify@v1.4.0
        with:
          publish-dir: ./public
          access-token: ${{ secrets.NETLIFY_ACCESS_TOKEN }}