Tasks page development #131
Workflow file for this run
This file contains 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: 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: '22' | |
- name: Install dependencies | |
run: npm install | |
# Add a check for linting | |
- name: Lint Code | |
run: npm run lint | |
env: | |
CI: true | |
- name: Create dummy amplifyconfiguration.json file | |
run: echo "{}" > amplifyconfiguration.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}` | |
}) | |