Something went wrong. Try again.
Website hub for the atmosphere community, aggregating posts, events, regional, and more
Something went wrong. Try again.
1.3 kB · 56 lines
YAML
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657name: Deploy
on: push: branches: [main] workflow_dispatch:
permissions: contents: read
concurrency: group: deploy cancel-in-progress: false
jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4
- name: Setup Node uses: actions/setup-node@v4 with: node-version: 22 cache: npm
- name: Install dependencies run: npm ci
- name: Verify site run: npm run verify
- name: Build site run: npm run build
deploy: needs: build if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Trigger Dokploy webhook env: DOKPLOY_WEBHOOK_URL: ${{ secrets.DOKPLOY_WEBHOOK_URL }} run: | if [ -z "$DOKPLOY_WEBHOOK_URL" ]; then echo "DOKPLOY_WEBHOOK_URL secret is not set." exit 1 fi
curl --fail-with-body --show-error --silent \ --request POST \ --header "Content-Type: application/json" \ --header "X-GitHub-Event: push" \ --data "{\"ref\":\"${GITHUB_REF}\",\"after\":\"${GITHUB_SHA}\",\"repository\":{\"full_name\":\"${GITHUB_REPOSITORY}\"}}" \ "$DOKPLOY_WEBHOOK_URL"