Skip to content

feat: add description on how to add a new post #85

feat: add description on how to add a new post

feat: add description on how to add a new post #85

Workflow file for this run

name: Catalyst Voices Updates
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, edited]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Cache Dart packages
uses: actions/cache@v3
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
- name: Compile Sass files
run: dart bin/main.dart
- name: Build site
run: dart run bin/main.dart
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build
deploy-production:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
concurrency:
group: "deploy-production"
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Install Firebase Tools
run: npm install -g firebase-tools
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
channelId: live
deploy-preview:
needs: build
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
pull-requests: write
checks: write
concurrency:
group: "pr-${{ github.event.pull_request.number }}"
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: Install Firebase Tools
run: npm install -g firebase-tools
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
expires: 30d