Skip to content

Commit

Permalink
ci: updated netlify deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed Oct 10, 2023
1 parent 317cc29 commit 21e9705
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/branch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
uses: nwtgck/actions-netlify@v2.0
with:
publish-dir: build/web
production-branch: ${{ github.ref }}
deploy-message: 'GH-ACTIONS: Deploy of branch ${{ github.ref }}'
production-branch: ${{ github.ref_name }}
deploy-message: 'GH-ACTIONS: Deploy of branch ${{ github.ref_name }}'
enable-commit-status: true
github-token: ${{ secrets.GITHUB_TOKEN }}
production-deploy: false
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Branch to Netlify

on:
pull_request:

jobs:
build-web:
name: Build Web
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v3

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Get Packages
run: flutter pub get

- name: Build Web
run: flutter build web

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.0
with:
publish-dir: build/web
production-branch: ${{ github.head_ref }} + "-" + ${{ github.sha }}
deploy-message: 'GH-ACTIONS: Deploy of PR from ${{ github.head_ref }}'
enable-commit-status: true
github-token: ${{ secrets.GITHUB_TOKEN }}
production-deploy: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

1 comment on commit 21e9705

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.