Skip to content

fix git authentication #7

fix git authentication

fix git authentication #7

Workflow file for this run

name: Deployment
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build Frontend
run: |
cd gui
npm install -g pnpm
pnpm install
pnpm release
- name: Use Golang
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build Backend
run: |
go build .
mv code-statistic stats
mv stats deploy/
- name: Process Application
run: |
mkdir deploy/app
mv app deploy/app/
- name: Commit Migration
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
cd deploy
git checkout -b deploy
git add .
git commit -m "deploy"
git push --force --quiet "https://${{ secrets.GITHUB_TOKEN }}@github.com/zmh-program/code-statistic.git"
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}