Skip to content

Commit

Permalink
Merge pull request #2 from ebisbe/ebg/fix-git-actions-flow
Browse files Browse the repository at this point in the history
optimize flow
  • Loading branch information
ebisbe authored Jul 12, 2024
2 parents 869b045 + 9bed321 commit 90ec0a0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Serverless actions
on: [pull_request]
name: Serverless deploy
on:
push:
branches:
- main
pull_request:

jobs:

deploy:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/remove-sls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Removes Serverless
on:
pull_request:
types: [closed]

jobs:

deploy:
name: Execute actions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- uses: pnpm/action-setup@v4

- name: Determine branch name
id: branch_name
run: echo "STAGE=pr${{ github.event.pull_request.number }}" >> $GITHUB_ENV


- name: Remove service
env:
SERVERLESS_ACCESS_KEY: ${{secrets.SERVERLESS_ACCESS_KEY}}
run: |
pnpm install
pnpm sls remove --stage=$STAGE

0 comments on commit 90ec0a0

Please sign in to comment.