Skip to content

Commit 8ecd173

Browse files
committed
Add CODEOWNERS file and create GitHub Actions workflow for automatic deployment to Vercel
1 parent 3d3d263 commit 8ecd173

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Require PRs modifying any file to be approved by these users
2+
* @mathieulrl @thibaultlangloisberthelot
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Push to Fork (kryptosphere-dev)
2+
3+
on:
4+
push:
5+
branches:
6+
- vercel
7+
8+
jobs:
9+
sync-to-fork:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up SSH
19+
run: |
20+
mkdir -p ~/.ssh
21+
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
22+
chmod 600 ~/.ssh/id_ed25519
23+
ssh-keyscan github.com >> ~/.ssh/known_hosts
24+
25+
- name: Set Git config
26+
run: |
27+
git config --global user.name "GitHub Action"
28+
git config --global user.email "actions@github.com"
29+
30+
- name: Make change (example)
31+
run: |
32+
echo "Last pushed at $(date -u)" > version.txt
33+
git add version.txt
34+
35+
- name: Remove workflows from commit
36+
run: |
37+
git restore --staged .github/workflows || true
38+
git restore .github/workflows || true
39+
40+
- name: Commit if needed
41+
run: |
42+
git diff --cached --quiet || git commit -m "Update version file at $(date -u)"
43+
44+
- name: Push to kryptosphere-dev
45+
run: |
46+
git remote add fork git@github.com:kryptosphere-dev/kryptosphere-api.git
47+
git push fork vercel --force

0 commit comments

Comments
 (0)