Create release #48
Workflow file for this run
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
name: Create release | |
run-name: Create release | |
on: | |
push: | |
branches: | |
- main | |
- replace_api_key | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- name: Update dependencies (pub get) | |
run: flutter pub get | |
- name: Generate translations | |
run: | | |
flutter pub global activate intl_utils | |
flutter pub global run intl_utils:generate | |
- name: Build web app | |
env: | |
FIREBASE_WEB_API_KEY: ${{ secrets.FIREBASE_WEB_API_KEY }} | |
run: | | |
flutter build web --release --base-href "/olpaka/" --dart-define=FIREBASE_WEB_API_KEY="$FIREBASE_WEB_API_KEY" | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 | |
with: | |
ruby-version: '3.1' # Not needed with a .ruby-version file | |
- name: Create Blog | |
working-directory: ./blog | |
run: | | |
bundle update | |
bundle exec jekyll build -d ../build/web/blog | |
- name: Upload static content | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './build/web/' | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
id: deployment |