-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 891 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Publish Netlify
on:
workflow_dispatch:
push:
branches:
- My-portfile
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Yarn install
run: yarn install --prefer-offline --frozen-lockfile
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build
run: yarn run build
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2
with:
publish-dir: 'build'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Staging Deploy from GitHub Actions'
production-deploy: true
github-deployment-description: 'My Portfolio Website'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}