Skip to content

docs: updated readme for amplify gen2 #132

docs: updated readme for amplify gen2

docs: updated readme for amplify gen2 #132

Workflow file for this run

name: CI/CD Pipeline
on:
pull_request:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm install
# Add a check for linting
- name: Lint Code
run: npm run lint
env:
CI: true
- name: Create dummy amplify_outputs.json file
run: echo "{}" > amplify_outputs.json
- name: Run build
run: npm run build
- name: Post success message
if: success()
uses: actions/github-script@v6
with:
script: |
const branchName = context.payload.pull_request.head.ref;
const previewUrl = `https://${branchName}.d3c5lsis3camij.amplifyapp.com/`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Build check completed! View branch preview: ${previewUrl}`
})