forked from Tonnanto/flutter-bird
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CD * Fix * Update flutter version * Update actions * Use stable of flutter * Add making .env * Delete permissions * Reflect review
- Loading branch information
1 parent
8db3020
commit 0911a8e
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Deploy Netlify | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: subosito/[email protected] | ||
with: | ||
flutter-version: '3.22.2' | ||
|
||
- name: Make .env | ||
working-directory: flutter_bird_app | ||
run: | | ||
touch .env | ||
echo WALLET_CONNECT_PROJECT_ID=${{secrets.WALLET_CONNECT_PROJECT_ID}} >> .env | ||
- name: Show version | ||
working-directory: flutter_bird_app | ||
run: flutter --version | ||
|
||
- name: Install packages | ||
working-directory: flutter_bird_app | ||
run: flutter pub get | ||
|
||
- name: Build | ||
working-directory: flutter_bird_app | ||
run: flutter build web | ||
|
||
- name: Set GitHub Deployment Environment | ||
id: github_deployment_environment | ||
run: | | ||
if [ "$GITHUB_EVENT_NAME" = "push" ]; then | ||
echo "GITHUB_DEPLOYMENT_ENVIRONMENT=Netlify prd" >> "${GITHUB_OUTPUT}" | ||
else | ||
echo "GITHUB_DEPLOYMENT_ENVIRONMENT=Netlify Preview" >> "${GITHUB_OUTPUT}" | ||
fi | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: './flutter_bird_app/build/web' | ||
production-branch: master | ||
github-deployment-environment: ${{ steps.github_deployment_environment.outputs.GITHUB_DEPLOYMENT_ENVIRONMENT }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: ${{ github.event.head_commit.message || github.event.pull_request.title }} | ||
alias: deploy-preview-${{ github.event.number }} | ||
fails-without-credentials: true | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_PAT }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
0911a8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://flutter-bird.netlify.app as production
🚀 Deployed on https://66988cf925623d2de4e46426--flutter-bird.netlify.app