2024-02-04 14:09:40 +00:00
|
|
|
name: Build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- v4
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-02-04 15:24:25 +00:00
|
|
|
env:
|
|
|
|
RUNNER_TOOL_CACHE: /toolcache
|
2024-02-04 14:09:40 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- run: git config --global core.quotepath false
|
2024-02-04 15:09:38 +00:00
|
|
|
- name: Install apt packages
|
|
|
|
run: apt update && apt install -y rsync
|
2024-02-04 14:09:40 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-02-04 14:56:14 +00:00
|
|
|
- uses: https://github.com/actions/setup-node@v4
|
2024-02-04 14:09:40 +00:00
|
|
|
with:
|
2024-02-04 15:02:21 +00:00
|
|
|
node-version: 'latest'
|
2024-02-04 14:56:14 +00:00
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: 'package-lock.json'
|
2024-02-04 14:09:40 +00:00
|
|
|
- run: npm i
|
|
|
|
- run: npx quartz build
|
2024-02-04 14:27:18 +00:00
|
|
|
- name: Create private key
|
|
|
|
run: |
|
|
|
|
echo "${{ secrets.PRIVATE_KEY }}" > /tmp/act_runner_key
|
|
|
|
chmod 600 /tmp/act_runner_key
|
|
|
|
- name: rsync public directory
|
|
|
|
run: |
|
2024-02-04 15:33:11 +00:00
|
|
|
rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no -p ${{ vars.WEBSERVER_PORT }}" ${{ gitea.workspace }}/public/* ${{ vars.WEBSERVER_USER }}@${{ vars.WEBSERVER_HOST }}:/var/www/html
|