-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.28 KB
/
build-and-deploy.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
37
38
39
name: Build and deploy
on:
push:
tags: v[1-9]+.[0-9]+.[0-9]+
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Actions/checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Actions/setup-node
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Create env file
run: |
touch .env
echo VITE_LASTFM_APIKEY=${{ secrets.LASTFM_APIKEY }} >> .env
echo VITE_LASTFM_SECRET=${{ secrets.LASTFM_SECRET }} >> .env
echo VITE_FANART_APIKEY=${{ secrets.FANART_APIKEY }} >> .env
- name: NPM build
run: npm run build --if-present
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './dist'
production-branch: main
production-deploy: true
deploy-message: 'Deploy from GitHub Actions'
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1