Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit a380911

Browse files
committed
migrate from gitlab ci to forgejo
1 parent 89d4b4f commit a380911

File tree

2 files changed

+51
-26
lines changed

2 files changed

+51
-26
lines changed

.forgejo/workflow/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master # or your default branch
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20' # specify your Node.js version
17+
- name: Install and Build
18+
run: |
19+
npm install
20+
npm run build
21+
- name: Upload artifact
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: vuepress-build
25+
path: .vuepress/
26+
27+
deploy:
28+
needs: build
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Download artifact
33+
uses: actions/download-artifact@v4
34+
with:
35+
name: vuepress-build
36+
path: .vuepress/
37+
- name: Configure Git
38+
run: |
39+
git config --global user.email "[email protected]"
40+
git config --global user.name "Jinming Wu, Patrick"
41+
- name: Clone and Deploy
42+
env:
43+
TOKEN: ${{ secrets.DEPLOY_TOKEN }} # You'll need to set this in your repository secrets
44+
run: |
45+
git clone --depth 1 https://patrick:${TOKEN}@code.wedotstud.io/wslu/website.git website
46+
cp -rf ./.vuepress/dist/* ./website/wslu/
47+
cd website
48+
git add -A
49+
git commit -m "wslu Wiki update at $(date)"
50+
git push
51+

.gitlab-ci.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)