Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: part11-ci-cd-systems

- uses: actions/setup-node@v4
with:
node-version: '20'
Expand All @@ -35,14 +35,14 @@ jobs:
- name: Run Tests
run: npm run test -- --watchAll=false
working-directory: part11

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: e2e tests
run: npm run test:e2e
working-directory: part11

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
Expand All @@ -51,11 +51,13 @@ jobs:
retention-days: 7

- name: Setup flyctl
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/part11-ci-cd-systems' }}
# Skip setup if the commit message contains #skip for push events on the target branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/part11-ci-cd-systems' && !contains(github.event.head_commit.message, '#skip') }}
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy to Fly.io
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/part11-ci-cd-systems' }}
# Skip deployment if the commit message contains #skip for push events on the target branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/part11-ci-cd-systems' && !contains(github.event.head_commit.message, '#skip') }}
run: flyctl deploy --remote-only -a pokedex-app-6035
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
Expand All @@ -64,7 +66,8 @@ jobs:
tag_release:
needs: [simple_deployment_pipeline]
runs-on: ubuntu-24.04
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/part11-ci-cd-systems' }}
# Skip tagging if the commit message contains #skip for push events on the target branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/part11-ci-cd-systems' && !contains(github.event.head_commit.message, '#skip') }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -76,4 +79,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_PREFIX: v
DEFAULT_BUMP: patch
DRY_RUN: "true"
DRY_RUN: "true"
Loading