Merge pull request #39 from kellnr/automation/changelog-6.0.0 #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build website | |
| run: npm run build | |
| - name: Create release artifact | |
| run: tar -czf dist.tar.gz -C dist . | |
| - name: Create or Update Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest | |
| name: Latest Deployment | |
| files: dist.tar.gz | |
| body: | | |
| Automated deployment from commit ${{ github.sha }} | |
| Deployed at: ${{ github.event.head_commit.timestamp }} | |
| - name: Trigger deployment webhook | |
| run: | | |
| curl -X POST \ | |
| -H "X-Webhook-Token: ${{ secrets.WEBHOOK_SECRET }}" \ | |
| -f \ | |
| https://kellnr.io/webhook/kellnr | |
| - name: Deployment Success | |
| if: success() | |
| run: | | |
| echo "Deployment completed successfully!" | |
| echo "Website deployed to: https://kellnr.io" | |
| - name: Deployment Failed | |
| if: failure() | |
| run: | | |
| echo "Deployment failed!" | |
| echo "Check the logs above for details." |