Repository navigation
66 lines (59 loc) · 1.81 KB
/
Copy pathnode.js.yml
File metadata and controls
66 lines (59 loc) · 1.81 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
workflow_dispatch:
inputs:
semver:
description: "Semver (leave blank if not making release, example '1.0.0')"
type: string
required: false
push:
branches:
- develop
pull_request:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6-beta
- name: Setup GitHub Pages
uses: actions/configure-pages@v5.0.0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v6.0.0
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm up && pnpm i --frozen-lockfile --shamefully-hoist --force
- name: Build site
run: NODE_ENV="production" webpack --bail
- name: Upload artifact
uses: actions/upload-pages-artifact@v4.0.0
with:
path: ./build/
- name: Deploy to GitHub Pages
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/develop'
uses: actions/deploy-pages@v4.0.5
- name: Make zip for release
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/develop' && inputs.semver
run: |
cd ./build/
zip -r ../penguinmod-v${{ inputs.semver }}.zip .
- name: Create release
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/develop' && inputs.semver
uses: ncipollo/release-action@v1.21.0
with:
tag: "v${{ inputs.semver }}"
name: "v${{ inputs.semver }}"
commit: develop
artifacts: "penguinmod-v${{ inputs.semver }}.zip"