diff --git a/.do/app.yaml b/.do/app.yaml deleted file mode 100644 index 8f957e1e5..000000000 --- a/.do/app.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: sample-nodejs -services: -- environment_slug: node-js - github: - branch: main - deploy_on_push: true - repo: digitalocean/sample-nodejs - name: sample-nodejs diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..18119d3a3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,62 @@ +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.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/public/stylesheets/style.css b/public/stylesheets/style.css index 9453385b9..4c27d92e8 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1,8 +1,8 @@ body { padding: 50px; - font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; + font: 15px "Lucida Grande", Helvetica, Arial, sans-serif; } a { - color: #00B7FF; + color: #02a2e1; }