-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (31 loc) · 1.09 KB
/
deploy-to-dahongpao.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
name: Deploy to Dahongpao
on:
push:
branches: [ 1.21-neoforge ]
workflow_dispatch:
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Clone GitHub Repo
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Build Static Pages
run: |
npm install --save-dev
npm run build
- name: Push to Dahongpao
env:
TEACON_DAHONGPAO_PUSH_AUTHORITY: ${{ secrets.TEACON_DAHONGPAO_PUSH_AUTHORITY }}
run: |
git config --global user.name 'TeaCon Bot'
git config --global user.email '[email protected]'
git clone https://$TEACON_DAHONGPAO_PUSH_AUTHORITY/teaconmc/Dahongpao.git --depth 1
cd Dahongpao; rm -rf workspaces/xiaozhong/build; cp -R ../build workspaces/xiaozhong/
git add workspaces/xiaozhong/build; git commit -m "Update xiaozhong at $(date -R)"
git push; cd ..