Skip to content

Commit 2b00aa8

Browse files
committed
Added deployment to GitHub Actions
1 parent 1f8ce8d commit 2b00aa8

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- icmods
7+
8+
concurrency: deploy
9+
10+
jobs:
11+
build:
12+
runs-on: ununtu-latest
13+
env:
14+
BRANCH_MASTER: icmods
15+
BRANCH_DEPLOY: deploy
16+
FRONTEND_DIRECTORY: apps/frontend
17+
if: github.event.workflow_run.conclusion != 'failure'
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
ref: ${{ env.BRANCH_MASTER }}
22+
fetch-depth: 0
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 10
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'pnpm'
32+
- name: Install dependencies
33+
run: pnpm install
34+
- name: Build
35+
run: pnpm run web:build
36+
- name: Configure git
37+
run: |
38+
git config --global user.name "MaXFeeD"
39+
git config --global user.email "maksfeed.mf@gmail.com"
40+
git config --global push.autoSetupRemote true
41+
- name: Run rm .git
42+
run: rm -frd .git
43+
- name: Push into deploy
44+
working-directory: ${{ env.FRONTEND_DIRECTORY }}/.output
45+
run: |
46+
git config --global init.defaultBranch $BRANCH_DEPLOY
47+
git init
48+
git add --force --all .
49+
git commit -m "Deploy" --quiet --no-verify
50+
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
51+
git push --force -u origin $BRANCH_DEPLOY

0 commit comments

Comments
 (0)