Update actions/checkout, actions/setup-node #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. | |