Skip to content

Commit 97b5c71

Browse files
committed
CI: add GitHub Actions CI
1 parent 74ecdaf commit 97b5c71

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/deploy.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
branches: ["*"]
4+
tags: ["*"]
5+
pull_request:
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Install Zola
15+
run: ./.ci/ci.sh
16+
17+
- name: Build the pages
18+
run: ./build.sh
19+
20+
- name: Deploy to website
21+
shell: bash
22+
if: ${{ !github.base_ref && github.ref == "refs/heads/master" }}
23+
run: |
24+
mkdir -p ~/.ssh
25+
echo '${{ secrets.KNOWN_HOST_STRING }}' >> ~/.ssh/known_hosts
26+
echo '${{ secrets.KEY_CONTENT }}' > ~/.ssh/id_upload_key
27+
chmod 0600 ~/.ssh/id_upload_key
28+
rsync -rlOvhze ssh --progress public/* 'upload@${{ secrets.UPLOAD_HOST }}:/srv/aosc-wiki/'
29+
echo "Visit your site at: https://wiki.aosc.io"

0 commit comments

Comments
 (0)