fix formatting errors #102
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: Deployment | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Lint | |
run: | | |
npm run lint | |
- name: Build App | |
run: | | |
npm run build | |
- name: Test | |
uses: cypress-io/github-action@v6 | |
with: | |
start: npm run dev | |
- name: "Deploy to Netlify" | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: "./dist" | |
production-branch: main | |
production-deploy: true | |
deploy-message: "Deploy from GitHub Actions" | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN_SECRET }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
build_and_push_Docker_images: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: "Set up QEMU" | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN}} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: ${{ secrets.DOCKERHUB_USERNAME }}/kanban:latest | |
- name: Run the image in a container | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ${{ secrets.DOCKERHUB_USERNAME }}/kanban:latest | |
run: | | |
echo "Running the docker image" |