Skip to content

Commit a90f9e8

Browse files
author
Saturn745
committed
Test publishing to codeberg pages
1 parent e6e3af4 commit a90f9e8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish to Codeberg Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
publish:
9+
runs-on: codeberg-tiny
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- name: Checkout source
15+
uses: https://code.forgejo.org/actions/checkout@v4
16+
17+
- name: Build with Retype
18+
uses: https://github.com/retypeapp/action-build@v3
19+
with:
20+
output: _build/
21+
22+
- name: Setup SSH key
23+
run: |
24+
mkdir -p ~/.ssh
25+
echo "${{ secrets.THE_MACHINE_PRIV }}" > ~/.ssh/id_rsa
26+
chmod 600 ~/.ssh/id_rsa
27+
ssh-keyscan codeberg.org >> ~/.ssh/known_hosts
28+
shell: bash
29+
30+
- name: Publish to Codeberg Pages
31+
run: |
32+
git config --global user.email "[email protected]"
33+
git config --global user.name "The Machine"
34+
35+
git clone --depth=1 [email protected]:LuaLink/pages.git _site
36+
rm -rf _site/*
37+
cp -r _build/* _site/
38+
39+
cd _site
40+
git add .
41+
git commit -m "Update site" || echo "No changes"
42+
git push origin HEAD:master

0 commit comments

Comments
 (0)