make the frontend container a real part of articleman ❤️ #1
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: Frontend Deployer | |
on: | |
push: | |
paths: | |
- "app/frontend/**" | |
# Install and cache all bun dependencies | |
jobs: | |
build_frontend: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: bun install | |
working-directory: app/frontend | |
- name: Build the frontend | |
run: bun run build | |
working-directory: app/frontend | |
- name: Deploy to Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CF_PAGES_API_TOKEN }} | |
accountId: ${{ secrets.CF_PAGES_ACCOUNT_ID }} | |
branch: ${{ vars.CF_PAGES_BRANCH }} | |
projectName: articleman | |
directory: app/frontend/build |