name: Build on: push: branches: - v4 jobs: build: runs-on: ubuntu-latest steps: - run: git config --global core.quotepath false - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Cache dependencies uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - run: npm i - run: npx quartz build - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: path: ./public - name: Create private key run: | echo "${{ secrets.PRIVATE_KEY }}" > /tmp/act_runner_key chmod 600 /tmp/act_runner_key - name: rsync public directory run: | rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no" ${{ gitea.workspace }}/public/* ${{ variables.WEBSERVER_USER }}@${{ variables.WEBSERVER_HOST }}:/var/www/html