| name: Production workflow |
| |
| on: |
| push: |
| branches: |
| - main |
| |
| jobs: |
| build-and-deploy: |
| runs-on: ubuntu-latest |
| |
| steps: |
| - name: Checkout code |
| uses: actions/checkout@main |
| |
| - name: Use Node.js 17.8.x |
| uses: actions/setup-node@main |
| with: |
| node-version: 17.8.x |
| - name: Build Docusaurus website |
| run: | |
| npm install |
| npm run build |
| - name: Deploy to netlify |
| uses: netlify/actions/cli@master |
| env: |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
| with: |
| args: deploy --dir=build --prod |