-
Notifications
You must be signed in to change notification settings - Fork 39
39 lines (39 loc) · 1.15 KB
/
publish.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:
branches:
- main
- beta
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4.2.2
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install and Build
run: |
npm ci --production=false # We also need to install dev dependencies for the build
npm run build
env:
REPOSITORY_NAME: ${{ github.event.repository.name }}
NODE_ENV: production
- name: Create archive as a preparation for the release
run: zip -r release.zip dist/**
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Release to GitHub
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy 🚀
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages
folder: dist
git-config-name: Carsten Hoffmann
git-config-email: carsten.c.hoffmann@deutschebahn.com