docs(README.md): update environment variables section #67
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: Continuous deployment workflow | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
continuous-deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch the repository | |
uses: actions/checkout@v4 | |
- name: Install the dependencies | |
run: npm install | |
- name: Create testing environment variables files | |
run: | | |
echo "NODE_ENV=testing" >> .env.testing | |
echo "${{ secrets.TESTING_ENV_FILE_CONTENT }}" >> .env.testing | |
- name: Run tests | |
run: npm run test | |
- name: Collect tests code coverage report | |
uses: ./tests-code-coverage-report/ | |
- name: Deploy tests code coverage report | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN_GITHUB }} | |
folder: deploy-tests-code-coverage-report | |
target-folder: tests-code-coverage-report | |
repository-name: AbdulrhmanGoni/AM-store-server-tests-code-coverage-report | |
branch: main | |
commit-message: "test:(code coverage) update tests code coverage report" | |
- name: Build the Docker Image | |
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/am-store-server . | |
- name: Log in to Docker hub | |
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | |
- name: Push the Docker Image | |
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/am-store-server | |
- name: Trigger deploy event for the server | |
run: curl ${{ secrets.RENDER_DEPLOY_HOOK_URL }} |