Skip to content

Commit

Permalink
Juntando em um único job p/ verificar se ao simular um erro os passos…
Browse files Browse the repository at this point in the history
… das pages ainda vai executar no github actions
  • Loading branch information
AndressaKarla authored Nov 19, 2024
1 parent 04a4bfe commit cc5fcf7
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/workflow-blacklist-academy-api-postman-newman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ jobs:
# agente de execução/runner
runs-on: ubuntu-latest

permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: https://andressakarla.github.io/blacklist-academy12.2-api-postman/postman-api-rest-report-htmlextra-newman.html

steps:
- name: Passo 1 - Obter cópia do código-fonte do repositório
uses: actions/checkout@v3
Expand All @@ -39,41 +48,25 @@ jobs:
# armazena o relatório html por 30 dias
retention-days: 30

deploy-github-pages:
# esse job "deploy-github-pages" somente é executado se o job anterior "postman-api-rest" for executado com sucesso
needs: postman-api-rest

runs-on: ubuntu-latest

permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: https://andressakarla.github.io/blacklist-academy12.2-api-postman/postman-api-rest-report-htmlextra-newman.html

steps:
- name: Passo 1 - Configurar pages
- name: Passo 6 - Configurar pages
if: ${{ always() }}
uses: actions/configure-pages@v2

- name: Passo 2 - Baixar report html armazenado no job anterior "postman-api-rest"
- name: Passo 7 - Baixar report html armazenado no "Passo 5 - Armazenar report html"
if: ${{ always() }}
uses: actions/download-artifact@v3
with:
name: postman-api-rest-report-html-newman
path: ./reports

- name: Passo 3 - Armazenar pages
- name: Passo 8 - Armazenar pages
if: ${{ always() }}
uses: actions/upload-pages-artifact@v1
with:
path: ./reports
retention-days: 30

- name: Passo 4 - Deploy/Publicar no Github Pages na "url" configurada em "deploy-github-pages > environment"
- name: Passo 9 - Deploy/Publicar no Github Pages na "url" configurada em "postman-api-rest > environment"
if: ${{ always() }}
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit cc5fcf7

Please sign in to comment.