-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (36 loc) · 1.01 KB
/
build-develop.yml
File metadata and controls
43 lines (36 loc) · 1.01 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
name: build
on:
push:
branches:
- 'develop'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules
- name: checkout develop-deploy
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull
git checkout develop-deploy
git reset --hard develop
- name: install npm packages
run: cd _indexer && npm install
- name: run indexer
run: node _indexer/index.mjs
- name: update develop-deploy
run: |
git add .
git add -f index.json
git commit -m "Deploy $GITHUB_SHA" || true
git remote set-url --push origin https://actions:$GITHUB_TOKEN@github.com/BossHobby/Templates
git push -f