Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create deploy_web_preview_to_gh_pages.yml #1

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
62 changes: 62 additions & 0 deletions .github/workflows/deploy_web_preview_to_gh_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: app

- name: Checkout "eidmsdk_flutter"
uses: actions/checkout@v4
with:
repository: slovensko-digital/eidmsdk-flutter
token: ${{ secrets.GH_PAT }}
path: eidmsdk_flutter

- name: Checkout "autogram_sign"
uses: actions/checkout@v4
with:
repository: slovensko-digital/avm-client-dart
token: ${{ secrets.GH_PAT }}
path: autogram_sign

- uses: subosito/flutter-action@v1
with:
flutter-version: '3.16.5'
channel: 'stable'

- name: Enable Flutter Web
run: flutter config --enable-web

- name: Install dependencies
working-directory: ./app
run: flutter pub get

- name: Build
working-directory: ./app
run: flutter build web --target=lib/preview.dart

# TODO Enable GH Pages: https://github.com/slovensko-digital/avm-app-flutter/settings/pages
# - name: Deploy
# TODO Use https://github.com/actions/deploy-pages instead
# uses: peaceiris/actions-gh-pages@v3
Copy link
Member

Choose a reason for hiding this comment

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

nepoužijeme tu v4? A dole ten commit sa robí načo? Podľa ich readme by tam malo stačiť mať token a publish_dir.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kludne najnovsie a bez commitu.

# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./app/build/web
# force_orphan: true
# user_name: 'github-ci[bot]'
# user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: 'Publish to gh-pages'
Loading