1
0
Fork 0
moritzruth.de/.forgejo/workflows/deploy.yaml
moritzruth fc5fd23038
All checks were successful
Deploy / build (push) Successful in 55s
Read repository name from variable in deployment workflow
2025-03-02 18:07:29 +01:00

45 lines
No EOL
1.2 KiB
YAML

name: "Deploy"
on: ["push"]
jobs:
build:
runs-on: "docker"
steps:
- name: "Checkout"
uses: "https://code.forgejo.org/actions/checkout@v4"
- name: "Setup pnpm"
uses: "https://github.com/pnpm/action-setup@v4"
with:
version: 10
- name: "Setup Node.js"
uses: "https://code.forgejo.org/actions/setup-node@v4"
with:
node-version-file: "package.json"
cache: "pnpm"
- name: "Install dependencies"
run: "pnpm install"
- name: "Build"
run: "pnpm build"
- name: "Upload"
id: "upload"
uses: "https://code.forgejo.org/forgejo/upload-artifact@v4"
with:
name: "site.zip"
if-no-files-found: "error"
path: |
./dist/**/*
!dist/.vite
- name: "Notify the web server"
run: >
curl https://moritzruth.de/_sscdc/notify
--fail
-H "Content-Type: application/json"
-H "Authorization: Bearer ${{ secrets.SSCDC_SECRET }}"
-d '{ "id": "${{ github.sha }}", "download_url": "https://git.moritzruth.de/${{ github.repository }}/actions/runs/${{ github.run_number }}/artifacts/site.zip" }'