-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.25 KB
/
deploy-releases.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
40
41
42
43
44
45
46
47
48
49
50
name: Deploy to releases.slint.dev
on:
push:
paths: 'releases/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Repository Checkout
uses: actions/checkout@v4
- name: npm install
run: |
cd releases && npm install
- name: Clone website directory
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
ssh-agent sh -c 'echo "${{ secrets.WEBSITE_READ_SSH_KEY }}" | ssh-add - && git clone [email protected]:slint-ui/website.git --depth 1'
- name: Copy index.html and 404.html
run: |
cp website/docs.html index.html
cp website/404.html 404.html
rm -rf website
- name: Install Netlify
run: |
npm install [email protected] -g
- name: Install Dependencies
run: |
npm ci
- name: Build project
run: |
npm run build
- name: Deploy to Netlify
id: netlify_deploy
run: |
netlify deploy \
--dir . \
--site ${{ secrets.NETLIFY_RELEASES_SITE_ID }} \
--auth ${{ secrets.NETLIFY_API_TOKEN }} \
--prod