This repository has been archived by the owner on Apr 21, 2024. It is now read-only.
Update README.md #23
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: "Deploy to Flatfile" | |
on: | |
push: | |
branches: | |
- dev | |
- prod | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install Flatfile CLI | |
run: yarn global add flatfile | |
- name: Install dependencies | |
working-directory: flatfile | |
run: yarn install | |
- name: Deploy to Flatfile | |
working-directory: flatfile | |
run: | | |
if [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then | |
export FLATFILE_ENV=test | |
elif [[ "${{ github.ref }}" == "refs/heads/prod" ]]; then | |
export FLATFILE_ENV=prod | |
fi | |
flatfile publish src/product/index.ts | |
env: | |
FLATFILE_TEAM_ID: ${{ secrets.FLATFILE_TEAM_ID }} | |
FLATFILE_ACCESS_KEY_ID: ${{ secrets.FLATFILE_ACCESS_KEY_ID }} | |
FLATFILE_SECRET: ${{ secrets.FLATFILE_SECRET }} |