-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (43 loc) · 1.24 KB
/
deploy.yaml
File metadata and controls
55 lines (43 loc) · 1.24 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Deploy to Vercel
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
JWT_SECRET: ${{secrets.JWT_SECRET}}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "^20.x"
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: creates output directory
run: sh ./build.sh
- name: Configure Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ secrets.EMAIL }}"
- name: Push to personal repository
run: |
cd output
git init
git add .
git commit -m "Deploy from GitHub Actions"
git branch -M main
git remote add origin https://s-ja:${{ secrets.FOR_DEPLOY }}@github.com/s-ja/linkle.git
git push origin main --force
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY