mirror of
https://github.com/jellyfin/jellyfin.org.git
synced 2025-06-29 00:48:31 +00:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
push:
|
|
branches: [master]
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
|
with:
|
|
node-version: 20
|
|
- uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
|
|
- name: Run build
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
- name: Upload artifact
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
|
|
with:
|
|
path: ./build
|
|
|
|
deploy:
|
|
if: github.event_name != 'pull_request'
|
|
name: Deploy to GitHub Pages
|
|
concurrency: build-deploy-pages
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@13b55b33dd8996121833dbc1db458c793a334630 # v3.0.1
|