diff --git a/.github/workflows/delete-preview.yml b/.github/workflows/delete-preview.yml
deleted file mode 100644
index 6793b6a..0000000
--- a/.github/workflows/delete-preview.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: Delete Preview
-
-on:
- pull_request:
- types: [ closed ]
-
-jobs:
- closed:
- runs-on: ubuntu-latest
- steps:
- - name: delete preview app
- uses: digitalocean/app_action/delete@v2
- with:
- from_pr_preview: "true"
- ignore_not_found: "true"
- token: ${{ secrets.YOUR_DIGITALOCEAN_ACCESS_TOKEN }}
diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml
deleted file mode 100644
index c4673c5..0000000
--- a/.github/workflows/deploy-app.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: Update App
-
-on:
- push:
- branches: [main]
-
-jobs:
- deploy-app:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Deploy the app
- uses: digitalocean/app_action/deploy@v2
- with:
- token: ${{ secrets.YOUR_DIGITALOCEAN_ACCESS_TOKEN_VARIABLE_NAME }}
diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml
deleted file mode 100644
index 718cd90..0000000
--- a/.github/workflows/deploy-image.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: Build, Push and Deploy a Docker Image
-
-on:
- push:
- branches: [main]
-
-jobs:
- build-push-deploy-image:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
- id-token: write
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Log in to the Container registry
- uses: docker/login-action@v3.3.0
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build and push Docker image
- id: push
- uses: docker/build-push-action@v6.5.0
- with:
- context: .
- push: true
- tags: ghcr.io/${{ github.repository }}:latest
- - name: Deploy the app
- uses: digitalocean/app_action/deploy@v2
- env:
- SAMPLE_DIGEST: ${{ steps.push.outputs.digest }}
- with:
- token: ${{ secrets.YOUR_DIGITALOCEAN_ACCESS_TOKEN_VARIABLE_NAME }}
diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml
deleted file mode 100644
index ec4067a..0000000
--- a/.github/workflows/deploy-preview.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-name: App Platform Preview
-
-on:
- pull_request:
- branches: [main]
-
-permissions:
- pull-requests: write
-
-jobs:
- test:
- name: preview
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Deploy the app
- id: deploy
- uses: digitalocean/app_action/deploy@v2
- with:
- deploy_pr_preview: "true"
- token: ${{ secrets.YOUR_DIGITALOCEAN_ACCESS_TOKEN }}
- - uses: actions/github-script@v7
- env:
- BUILD_LOGS: ${{ steps.deploy.outputs.build_logs }}
- DEPLOY_LOGS: ${{ steps.deploy.outputs.deploy_logs }}
- with:
- script: |
- const { BUILD_LOGS, DEPLOY_LOGS } = process.env
- github.rest.issues.createComment({
- issue_number: context.issue.number,
- owner: context.repo.owner,
- repo: context.repo.repo,
- body: `🚀🚀🚀 The app was successfully deployed at ${{ fromJson(steps.deploy.outputs.app).live_url }}. [1]`
- })
- - uses: actions/github-script@v7
- if: failure()
- with:
- script: |
- github.rest.issues.createComment({
- issue_number: context.issue.number,
- owner: context.repo.owner,
- repo: context.repo.repo,
- body: `The app failed to be deployed. Logs can be found [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
- ## Logs
-
- Build logs
[2]
- \`\\
- ${BUILD_LOGS}
- \`\\
-
-
- Deploy logs
[3]
- \`\\
- ${DEPLOY_LOGS}
- \`\\
- `
- })
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 13c4b22..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Node.js CI
-
-on:
- push:
- branches: [ "master" ]
- pull_request:
- branches: [ "master" ]
-
-jobs:
- build:
-
- runs-on: self-hosted
-
- steps:
- - uses: actions/checkout@v2
- - name: Use Node.js 18.x
- uses: actions/setup-node@v2
- with:
- node-version: 18.x
- - run: npm install
- - run: npm test
- - run: pm2 restart app-name