-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (50 loc) · 1.32 KB
/
build-develop.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
51
52
53
54
55
56
57
58
59
60
name: build-develop
on:
push:
branches:
- "develop"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-develop-node_modules
- name: install npm packages
run: npm install
- name: build gh-pages
run: |
npm run build:gh-pages
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: gh-pages
path: docs
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: checkout gh-pages
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git fetch
git checkout gh-pages
- uses: actions/download-artifact@v4
with:
name: gh-pages
path: develop
- name: update develop gh-pages
run: |
git add .
git commit -m "GitHub Pages $GITHUB_SHA" || exit 0
git remote set-url --push origin https://actions:$GITHUB_TOKEN@github.com/BossHobby/Configurator
git push -f