Retry to make test inside a .github action #2
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: Deploy to Staging | |
on: | |
push: | |
branches: [ development ] | |
jobs: | |
deploy-staging: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/development' | |
steps: | |
- uses: satackey/[email protected] | |
# Ignore the failure of a step and avoid terminating the job. | |
continue-on-error: true | |
- name: Save my code in site directory | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GIT_PAT }} #Your GitHub access token | |
ref: development | |
- name: Set my ssh key and ssh-agent | |
uses: webfactory/[email protected] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: yarn install | |
working-directory: src | |
# Add support for more platforms with QEMU (optional) | |
# https://github.com/docker/setup-qemu-action | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# install Docker and enable docker service | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Run test | |
run: docker-compose run addressbook npm test | |
working-directory: src |